Skip to content
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

Unnecessary aria-label on text links opening new windows #20129

Closed
aardrian opened this issue Feb 9, 2020 · 3 comments
Closed

Unnecessary aria-label on text links opening new windows #20129

aardrian opened this issue Feb 9, 2020 · 3 comments

Comments

@aardrian
Copy link

@aardrian aardrian commented Feb 9, 2020

Describe the bug
If I create a link that opens in a new window, the link gets an aria-label attribute with the full text of the link plus the text "(opens in a new tab)".

For pages that are machine-translated, aria-label is only automatically translated in Chrome and ChromiEdge. That means for more than half of screen reader users who visit a page in another language, they will hear the link in the page's original language even though the link text itself will be translated.

This is an accessibility / internationalization issue.

To reproduce
Steps to reproduce the behavior:

  1. Go to https://wordpress.org/gutenberg/.
  2. Select any piece of text and add a link.
  3. After adding the link, toggle the option to open in new tab.
  4. Change to Edit as HTML.

Expected behavior
The aria-label attribute should not be used.

Instead of this:

<a href="https://example.com" target="_blank" rel="noreferrer noopener" aria-label="building engaging content (opens in a new tab)">building engaging content</a>

It should be this:

<a href="https://example.com" target="_blank" rel="noreferrer noopener">building engaging content</a>

Gutenberg can add plain text into the link text announcing the new window, thereby benefiting all users regardless of language.

Screenshots
Text link highlighted with new window chosen.
HTML view showing the aria-label on the link.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Firefox 72, Chrome 79

Additional context

@swissspidy

This comment has been minimized.

Copy link
Member

@swissspidy swissspidy commented Feb 10, 2020

Sounds like a duplicate of #18727.

@aardrian

This comment has been minimized.

Copy link
Author

@aardrian aardrian commented Feb 10, 2020

Similar problem with same solution.

In Marco's case, he is an author trying to add a link in the language of the site and getting the "opens in new window" text in English. That affects site authors.

In my example, a user would try to auto-translate a page, and the entire text string (not the just "opens in new window") would not get translated.

Thanks for linking that, though. I did not find it when I looked for existing issues.

@youknowriad

This comment has been minimized.

Copy link
Contributor

@youknowriad youknowriad commented Feb 12, 2020

also, duplicate of #12325 which is also discussed in #18742

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.