Receiving focus must not trigger a page navigation
Rule
on-focus-navigation· Component patterns (best practice) · impact serious · Live only (static → incomplete)
Why it matters
If simply Tabbing onto an element navigates the page, keyboard and screen-reader users can never get past it — they lose their place (and any work in progress) just by moving focus. The engine Tabs through the live page and reports the element that had focus when an unexpected navigation occurred.
How to fix
Never navigate or submit from a focus handler. Trigger context changes only on explicit activation (Enter/click), and warn users in advance when a control behaves unusually.
Example
<input onfocus="location.href='/next'">
<input>
WCAG success criteria
3.2.1 On Focus — Level A
Merely receiving focus must never trigger a change of context (navigation, form submission, a new window, or moved focus).
Standards
This rule contributes to the following standards:
WCAG A EN 301 549 Section 508 Trusted Tester
| Standard | Criteria |
|---|---|
| Section 508 | 3.2.1 |
| EN 301 549 | 9.3.2.1 |