Do not open windows the user never requested
F22 is a documented failure, so it describes something to remove rather than something to build. The pattern is a window that opens without anybody asking for it, on a timer, on page load, or off the back of an action that meant something else. There is a clear line here and it is easy to draw it too hard. A window the user chose is fine. Opening an options dialog because somebody pressed the button labeled Options is exactly what should happen. The failure is the unexpected one. A link that says it opens in a new tab, and then does, is a request. A timer that opens a promotion three seconds after the page loads is not.
How we find it in an audit
We load the page and watch for a few seconds without touching anything, then activate every link and button in turn and watch again. Both halves matter, because the load-time case and the activation case are separate defects with the same symptom. Where a window does open on purpose, we check that the link text says so in words a person would notice. We deliberately do not accept a title attribute as that warning, since it never reaches keyboard-only or touch-only users.
How affected users experience it
A new window arrives with no announcement. 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 Back stops working, because Back belongs to the window they are no longer in, and the way home is a window-switching command plenty of people have never had to learn. Someone using a magnifier can lose the new window entirely, since it opened outside the small region they are looking at.
Passes vs. fails
Passes
<a href="/promo" target="_blank">Current offers (opens in new tab)</a>
<!-- The user reads what will happen, then chooses it. -->Fails
setTimeout(function () { window.open("/promo", "_blank"); }, 3000);
// Three seconds after load, a window nobody asked for.How this gets tested
The W3C publishes test rules that define what a checker looks for here.
- 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
16 guides on this site are filed under 3.2.5 Change on Request. W3C documents this one as a failure of that rule, so it describes a way the rule gets broken rather than a way to pass it.
- G76sufficientUpdate content only when the user asks
- G110sufficientMake client-side redirects instant, not timed
- H76sufficientMake meta refresh redirects instant, never timed
- H83sufficientWarn users when links open new windows
- SCR19sufficientNever change context when a select changes
- SCR24sufficientOpen new windows only when the user asks
This guide is our interpretation of W3C technique F22: Failure of Success Criterion 3.2.5 due to opening windows that are not requested by the user. 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.