WCAG Encyclopedia

3.2.1 · UnderstandableLevel A

On Focus

Focusing something must not change the context — no navigating away, no opening a dialog, no submitting. Focus happens by accident all the time, because tabbing through a page focuses everything on the way past.

Principle
Understandable
Guideline
3.2
Level
A
In WCAG since
2.0
Number
3.2.1

Broken, then fixed

The same interface twice: first with the mistake, then with the smallest change that fixes it.

Broken: Tabbing onto the select navigates immediately.
Jump to section ▾navigates on focus

A keyboard user tabbing toward the search box lands on this and is thrown to another page. They cannot get past it — every attempt to move on triggers it again.

Fixed: Focus does nothing; an explicit action navigates.
Jump to section ▾Gonavigates on Go

Focusing shows the options. Choosing one selects it. Pressing Go acts on it. Three separate events, and only the last one is a decision.

How to test

Check your own interface against 3.2.1, one step at a time.

  1. Put the mouse aside, reload the page and press Tab to move through every link, button, form field and other control in turn.
  2. Watch what happens as each one receives focus. Nothing may submit a form, load another page, or open a new window or dialog.
  3. Check that focus stays where Tab put it. A script that sends focus somewhere else as soon as a control receives it fails 3.2.1.
  4. Note anything that appears on focus, such as a tooltip or a menu that expands. That is allowed, as long as focus, the page and the window stay the same.
  5. Repeat the check inside every dialog, menu and later form step that opens when you activate something.

Common questions

Is a menu that opens on focus a failure of 3.2.1?

No. A menu that expands when it receives focus changes the content, not the context. It fails only if it also moves focus or takes the reader to another page.

Does 3.2.1 apply to mouse hover?

No. Hovering does not move focus, so 3.2.1 is about keyboard focus. Content that appears on hover is covered by 1.4.13 Content on Hover or Focus.

Does opening a dialog when a field gets focus fail 3.2.1?

Yes. A dialog that opens on focus and pulls focus into it is a change of context, and a keyboard user sets it off just by tabbing past.

Try it yourself

A lab is a small working piece of interface that you change yourself. Read its steps, use the controls under it, and watch the verdict line at the bottom: it says whether the criterion passes or fails as you go. Reset puts it back.

Try it: what focus does

How to use this lab

  1. Goal. Tab through a checkout form without anything happening that you didn’t ask for.
  2. The controls. The options under “When Email gets focus” set what the Email field does when focus reaches it: Nothing, Sends the form or Opens another page. The Press Tab in the form button moves focus to the next stop in the mock form: Name, Email, then Send.
  3. Try this. The lab starts on Sends the form. Press Tab in the form twice and watch the form go before Email is filled in. Then choose Nothing and press Tab in the form again.
  4. What it means. With Nothing, 3.2.1 passes: focus only moves, and only Send sends. With Sends the form or Opens another page, 3.2.1 fails, because keyboard and screen reader users are thrown out of the form just by moving through it. The verdict line under the lab says which.
When Email gets focus
Focus is not in the form yet

3.2.1 fails

Also in guideline 3.2

Criteria in the same guideline often fail together.