Skip to content
3.2.1 · Level A · WCAG 2.0 · Understandable → Predictable

On Focus

Moving keyboard focus to a control does not by itself change the context: no navigation, no form submission, no new window, no focus being moved somewhere else.

Why it matters

A keyboard user tabs through every control to find the one they want. If merely landing on a link opens it, or landing on a field pops up a dialog, they can never get past it to the rest of the page.

Needs manual testing

Focus handlers are JavaScript and no rule evaluates what they do. Tab through the entire page once and confirm that nothing happens except the focus indicator moving.

Fails

<select id="currency" onfocus="this.form.submit()">
  <option>USD</option>
  <option>EUR</option>
</select>

Tabbing onto the select submits the form before the user has chosen anything.

Passes

<form action="/preferences" method="post">
  <label for="currency">Currency</label>
  <select id="currency" name="currency">
    <option>USD</option>
    <option>EUR</option>
  </select>
  <button type="submit">Save</button>
</form>

Focus changes nothing. The form is submitted only when the user activates the Save button.

Openwell finds violations like this one across your whole site, clusters them by the component that caused them, and generates a fix that's re-validated before you see it.

Scan your site free
WCAG 3.2.1 On Focus — what it requires and how to fix it — Openwell