chore(documentation): removed obsolete target=blank occurences from the DS documentation - #8220
chore(documentation): removed obsolete target=blank occurences from the DS documentation#8220myrta2302 wants to merge 15 commits into
target=blank occurences from the DS documentation#8220Conversation
🦋 Changeset detectedLatest commit: 5fc8f1d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
target="blank" / "self" occurences from the DS documentationtarget=blank/self occurences from the DS documentation
oliverschuerch
left a comment
There was a problem hiding this comment.
Is there a ticket for that?
And should we create a changeset, since our users are directly affected by this change?
Sorry for not including this from the start in the PR description. This was actually a review comment i got on the Blueprint update. I did not create a ticket, because of the small size of the task. Changeset added. |
oliverschuerch
left a comment
There was a problem hiding this comment.
As a general statement about target="_blank":
AI Generated
The a11y position on target="_blank"
There's no WCAG rule that forbids it outright. The relevant guidance:
- WCAG 3.2.5 Change on Request (AAA): opening a new window without warning is a failure at the AAA level. It's not a failure at AA — but it's listed as a technique to avoid.
- G200 (Opening new windows on user request): the accepted practice is to only open new tabs/windows when there's a genuine reason, and to warn the user when you do.
So the recommendation is: don't reach for target="_blank" by default. Use it deliberately, and when you do, make it perceivable.
If you do use it
Two things are needed:
Security: pair it with rel="noopener noreferrer" (modern browsers imply noopener, but be explicit).
Warn the user: expose "(opens in new tab)" — ideally visible text, or at minimum for AT, e.g. a visually-hidden span:
<a href={this.url} target="_blank" rel="noopener noreferrer">
<slot />
<span class="visually-hidden">(opens in new tab)</span>
</a>…://github.com/swisspost/design-system into remove-target-blank-from-post-linkarea-markup
target=blank/self occurences from the DS documentationtarget=blank occurences from the DS documentation
target=blank occurences from the DS documentationtarget=blank occurences from the DS documentation
…move-target-blank-from-post-linkarea-markup
|



Removed obsolete
target="blank"occurences across the DS documentation.🔮 Design review
🧪 Visual regression tests
📝 Checklist