Skip to content

Conversation

@KevinEtchells
Copy link

For links that open in a new tab or window, it is advisable to give users advance warning of this. This is from an accessibility perspective, where if this happens unexpectedly this could be disorientating for some users. Please see further information around this here:
https://www.w3.org/TR/WCAG20-TECHS/G201.html

A small step to improve this would be to add some accessible text to warn users of this. This would be announced by screen-readers, but not visibly shown. E.g.

<a href="http://example.com" rel="noopener noreferrer" target="_blank">my link</a>

Becomes:

<a href="http://example.com" rel="noopener noreferrer" target="_blank" aria-label="my link (opens in new tab)">my link</a>

This only applies if the openLinksInNewWindow option is set.

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.

1 participant