-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
When adding a link that opens in a new tab, the screen reader text does not honor the site language #18727
Comments
Just adding a note that I can reproduce this unexpected behavior on a non wp.com site too – by setting my user's language to a different language than the site's language. The content added by the "open in a new window" toggle is translated into the language I'm seeing when editing the post, which might not be the language used in the post. |
Just reproduced on trunk as well. Site language: English Resulting markup:
Looks like the appended text is translated based on the user language. Instead, it should be based on the site language. Also: this highlights a problem related to the user interface. The text gets appended and stored in the post content but content authors may not be aware of it. The UI should should display this text in some way and give the ability to change it. Also wondering what happens with multi-lingual plugins that usually work by duplicating the post content in the original language. For example, users would get a post originally written in English to translate to French. They can translate the text they can see in the UI. Not sure how they're supposed to translate text that can't be seen (unless they know how the appended text works). |
Why not add the screen reader text dynamically in PHP? That would solve this issue. |
Related: #12325 (comment) 🤷♂ |
Is this still an issue? I tested just now and it looks like the extra text is no longer appended. Let me know if I'm missing some aspect of the reproduction steps. |
I can't remember why and when it was removed. Any clue? |
Describe the bug
When publishing an article to a site whose language is different to the current WordPress UI language, and inserting a link that opens in a new tab, the additional screen reader text " (opens in a new tab)" is appended to the aria-label in the language WordPress is set to, not the language of the specific site the article is being published at. So if my WP user interface is German, but the particular site is in English, the text gets added in German, but should be in English.
To reproduce
Steps to reproduce the behavior:
Expected behavior
The aria-label that contains both the link text and the addition of " (opens in a new tab)" should have that extra text in English, which is the site's language. But it actually is in German, which is the language WP is currently running in.
Screenshots
I'm blind, screenshots are difficult.
Desktop (please complete the following information):
Additional context
Screen readers usually read the text of a page in a given language, in this case, English. Hearing the German equivalent of " (opens in a new tab)", " (öffnet in neuem Tab)", is unexpected and meaningless to someone not speaking German. It should be in the language the actual article text is in, which is usually determined by the setting for the Site Language under Manage/General, or Site Identity in the Customizer.
The text was updated successfully, but these errors were encountered: