-
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
Links that open in a new tab/window need to inform users a new tab/window will open #1105
Comments
Could render an adjacent https://developer.wordpress.org/resource/dashicons/#external Maybe even logic built-in to the link component to detect whether it should be shown by default based on |
Yes, something like that could help, however "external" doesn't exactly mean "new tab/window": it just means external site (as in opening an external site in the same window). |
I'm interested in working on this feature and improving the user experience with the addition of the external icon having an a11y label for the screen readers. |
Most links in WordPress don't have |
…ndow will open ## Description Fixes WordPress#1105 by adding the external dashicon and the standard screen reader text too. ## How Has This Been Tested? I checked that the Excerpt external link which makes use of the new ExternalLink component contains the new icon and displays it correctly in major OSX browsers (Safari, Chrome, Firefox). I used the browser's inspector to confirm the screen-reader-text element gets properly added as well. ## Screenshots: ![Updated panel](http://files.urldocs.com/share/excerpt-block-updated/excerpt-bloc k-updated.png) ## Types of changes New feature (non-breaking change which adds functionality) ## Checklist: - [x] My code is tested. - [x] My code follows the WordPress code style. - [x] My code follows has proper inline documentation. (Other as basic components don't have inline documentation, just like this one)
…ndow will open (#1577) * Links that open in a new tab/window need to inform users a new tab/window will open ## Description Fixes #1105 by adding the external dashicon and the standard screen reader text too. ## How Has This Been Tested? I checked that the Excerpt external link which makes use of the new ExternalLink component contains the new icon and displays it correctly in major OSX browsers (Safari, Chrome, Firefox). I used the browser's inspector to confirm the screen-reader-text element gets properly added as well. ## Screenshots: ![Updated panel](http://files.urldocs.com/share/excerpt-block-updated/excerpt-bloc k-updated.png) ## Types of changes New feature (non-breaking change which adds functionality) ## Checklist: - [x] My code is tested. - [x] My code follows the WordPress code style. - [x] My code follows has proper inline documentation. (Other as basic components don't have inline documentation, just like this one) * 1105 - Fix formatting * 1105 - Changed the class name. Added translators: accessibility text comment
Reopening because things have changed a bit and this issue still needs to be fully addressed. On current master, there are a few occurrences of links that use a Some of these links are:
Edge cases: There is now an |
I'll take a look at fixing this next. |
There are some cases where links use
target="_blank"
. For example:current link html:
<a href="https://codex.wordpress.org/Excerpt" target="_blank">Learn more about manual excerpts</a>
In all these cases, the link should inform users a new tab/window will open;
(opens in a new window)
, see https://core.trac.wordpress.org/changeset/40643See also: https://core.trac.wordpress.org/query?keywords=~target-blank
The text was updated successfully, but these errors were encountered: