8000 fix(links): Add "opens in new tab" accessible text by KevinEtchells · Pull Request #1037 · showdownjs/showdown · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(links): Add "opens in new tab" accessible text #1037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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
0