Skip to content

chore(documentation): removed obsolete target=blank occurences from the DS documentation - #8220

Open
myrta2302 wants to merge 15 commits into
mainfrom
remove-target-blank-from-post-linkarea-markup
Open

chore(documentation): removed obsolete target=blank occurences from the DS documentation#8220
myrta2302 wants to merge 15 commits into
mainfrom
remove-target-blank-from-post-linkarea-markup

Conversation

@myrta2302

@myrta2302 myrta2302 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Removed obsolete target="blank" occurences across the DS documentation.

🔮 Design review

  • Design review done
  • No design review needed

🧪 Visual regression tests

  • Visual changes detected and approved (Check this box if VRT fails and changes are intentional)

📝 Checklist

  • ✅ My code follows the style guidelines of this project
  • 🛠️ I have performed a self-review of my own code
  • 📄 I have made corresponding changes to the documentation
  • ⚠️ My changes generate no new warnings or errors
  • 🧪 I have added tests that prove my fix is effective or that my feature works
  • ✔️ New and existing unit tests pass locally with my changes

@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5fc8f1d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@swisspost/design-system-documentation Patch

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

@myrta2302 myrta2302 changed the title chore(documentation): removed all target="blank" / "self" occurences from the DS documentation chore(documentation): removed all target=blank/self occurences from the DS documentation Jul 31, 2026
@swisspost-bot

swisspost-bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Related Previews

@myrta2302
myrta2302 marked this pull request as ready for review August 3, 2026 06:11
@myrta2302
myrta2302 requested review from a team as code owners August 3, 2026 06:11

@oliverschuerch oliverschuerch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a ticket for that?
And should we create a changeset, since our users are directly affected by this change?

@myrta2302

myrta2302 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

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 oliverschuerch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a general statement about target="_blank":

AI Generated Flags content which is completely or mostly generated by AI.

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>

@myrta2302 myrta2302 changed the title chore(documentation): removed all target=blank/self occurences from the DS documentation chore(documentation): removed all target=blank occurences from the DS documentation Aug 21, 2026
@myrta2302 myrta2302 changed the title chore(documentation): removed all target=blank occurences from the DS documentation chore(documentation): removed obsolete target=blank occurences from the DS documentation Aug 21, 2026
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants