Open new windows only when the user asks
SCR24 is a sufficient technique, and W3C's title for it says the whole thing. Open new windows on user request. The method is progressive enhancement rather than a prohibition. You write an ordinary link that opens in the current window, script adds the behavior that opens a new one, and the link text tells the user before they commit. Three parts hold it up. The warning has to be in the link, the handlers have to be device-independent so a keyboard reaches them, and the plain href has to still work when the new window does not. W3C's own wording covers tabs as well as windows, which matters because most browsers now give you a tab whatever you asked for. There is a route to the same outcome without any script at all, using the target attribute with the warning written into the link text, and that is H83 rather than this technique.
How we find it in an audit
Reviewers load the page and watch what opens before touching anything, then activate every link and button and watch again. A scanner can find window.open in your bundle. It cannot tell whether the user asked for the window, which is the only question that matters here. So we read the link text for a warning a person would actually notice. We take the same route with the keyboard, to confirm the handler is not pointer-only. Then we turn script off and see whether the href still leads somewhere sensible.
How affected users experience it
A new window arrives with no announcement that anything changed. The screen reader user hears content that does not follow from what they were reading, and has to work out from the content alone that they are somewhere else. Then comes the part that costs the most. Back does nothing, because Back belongs to a window they are no longer in, and the route home is a window-switching command many people have never needed to learn. For someone using a magnifier the new window can land entirely outside the region they are looking at, so the page appears to have gone blank.
Passes vs. fails
Passes
<a href="/glossary" class="newwin">Glossary (opens in a new window)</a>
// Script upgrades the click to open a window. Without script the href still opens it here.Fails
window.open("/promo", "_blank");
// Fires on load. Nobody asked, and Back leads nowhere.How this gets tested
The W3C publishes test rules that define what a checker looks for here.
- Link has non-empty accessible nameA tool can check this
- Link in context is descriptiveA tool can check this
- Links with identical accessible names and same context serve equivalent purposeA tool finds candidates, you decide
- Form field label is descriptiveA tool can check this
- Heading is descriptiveA tool can check this
- Link is descriptiveA tool can check this
- Links with identical accessible names have equivalent purposeA tool can check this
- Meta element has no refresh delayA tool can check this
- Meta element has no refresh delay (no exception)A tool can check this
The other techniques filed under this rule
22 guides on this site are filed under 2.4.4 Link Purpose (In Context). W3C lists this one as advisory for that rule rather than sufficient, which means it helps real readers without being accepted as evidence you conformed.
- ARIA7sufficientBuild clear link names from nearby headings
- ARIA8sufficientFix vague link text with aria-label
- C7sufficientAdd hidden text to clarify short links
- G53sufficientLet the sentence around a link explain it
- G91sufficientWrite link text that states its purpose
- G189sufficientOffer a switch to self-describing link text
This guide is our interpretation of W3C technique SCR24: Using progressive enhancement to open new windows on user request. W3C publishes its techniques as guidance rather than as the standard, and says so on every one of them. The success criterion is what conformance is measured against, and a technique is one documented way to meet it.