Skip to main content
Perceivly: Perceivly home

3.2.1 On Focus

Level A · added in WCAG 2.0

When any control receives focus, it must not trigger a change of context. A change of context is a major change, such as opening a new window, submitting a form, moving focus elsewhere or loading a new page.

Who it helps

Keyboard and screen reader users move focus through a page to explore it. If focus alone opens windows or jumps elsewhere, they get lost or cannot reach the rest of the page. People with cognitive disabilities and low vision are also confused by sudden changes.

How to meet it

Examples

Fails:A help window opens as soon as the field gets focus
<label for="vat">VAT number</label>
<input id="vat" type="text" onfocus="window.open('/help/vat')">
Fails:The form submits when focus reaches the button
<form id="signup" action="/signup" method="post">
  <label for="email">Email</label>
  <input id="email" type="email" autocomplete="email">
  <button onfocus="document.getElementById('signup').submit()">Sign up</button>
</form>
Passes:Help is a link the user chooses to open
<label for="vat">VAT number</label>
<input id="vat" type="text" aria-describedby="vat-help">
<a id="vat-help" href="/help/vat">Where to find your VAT number</a>
Passes:A normal submit button that only acts when pressed
<form action="/signup" method="post">
  <label for="email">Email</label>
  <input id="email" type="email" autocomplete="email">
  <button type="submit">Sign up</button>
</form>

Can a scanner detect this?

No

axe-core has no rule for this criterion, because it only shows up when focus moves at run time. A person must tab through the page and watch for windows, page loads, submits or focus jumps.

No automated rule tests this criterion. Check it by hand.

Common mistakes

Official W3C explanation of 3.2.1

Check your own page

See which automated WCAG checks your page fails, with the failing elements and how to fix them.

Enter a page address, for example example.com/shop.

Reviewed November 2, 2026