Open joemull opened 6 months ago
I have reached a similar conclusion - for external links, we should indicate in the text that the link will be opening in a new tab. And I prefer the solution with a visual cue Something along these lines:
Perhaps the example that combines the aria-describedby and the visual cue? while adding "opens in a new tab" does satisfy the WCAG, it does add more cognitive load than a visual cue.
I wonder whether it would be cleaner to do this just in the CSS without needing any JS, with a target for any links which have other domains?
a[href^="http"]:after
User stories
Proposed solution Use JS to detect links to external domains and add attributes as follows:
Also, potentially add a visual cue.
This solution would satisfy WCAG 2.2.
Context
sr-only
dev notes Using an icon to indicate a link opens in a new tab or window (CSS rule that checks target) e.g.
a[target="_blank"]:after
@joemull will investigate how this affects TinyMCE and how we can ensure user provided links get this accessibility improvements