WCAG 3.2.1: On Focus

WCAG 3.2.1 On Focus is a level A success criterion from WCAG 2.0. Focusing a control does not trigger a change of context, such as submitting a form or opening a new page.

Keyboard users tab through a form to read it. A surprise submit loses their place.

How to test

Tab through a form. Focus alone should not submit, navigate, or open a dialog.

How to fix

Move those actions to an explicit button.

Example that fails

Focusing the last field submits the form.

Example that passes the check

Nothing happens until the person presses the button.

Shopify

Do not submit the newsletter form on focus in theme scripts.

WooCommerce

Do not auto-advance checkout on focus.

WordPress

Remove onfocus handlers that navigate.

Wix

Do not set focus actions that change the page.

Related fixes