Rule
New-window warnings
Links opening a new window should say so.
- Rule
new-window-link- Type
- Best practice, not a WCAG requirement. It runs when Best practices is switched on.
- Severity
- Minor
What it checks
The rule looks at links with target="_blank". It passes when the link's name, its title or the text it points to with aria-describedby mentions a new window or tab, or says it opens in something. Otherwise it fails.
A new window or tab breaks the back button and can go unnoticed by someone who cannot see the screen change. A warning in the link lets people decide before they follow it.
When a person decides
The wording check reads English only. When the link's language, or the page's, is declared as something other than English, the rule cannot tell whether a warning is there, so it asks for review instead of failing.
Example
Fails
<a href="/annual-report.pdf" target="_blank">Annual report</a>
Passes
<a href="/annual-report.pdf" target="_blank">Annual report (opens in a new tab)</a>
The engine is tested against both examples.
How to fix it
Add "opens in a new tab" to the link text, either visibly or in visually hidden text, or remove target="_blank".
Check your own pages
This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.