3.2.1 On Focus [A]

Level A

When any user interface component receives focus, it does not initiate a change of context.>

Explanation

When someone focuses on a control using the keyboard, it must not trigger a change of context like loading or reloading a page, or submitting a form. This stops unexpected things happening as a keyboard user navigates the page, and makes sure the user is in control.

Roles

  • Design
  • Development
  • QA

Requirements

  • focus events do not cause navigation, nor form submission.

Common mistakes

  • The onFocus JavaScript event is used to trigger an action;
  • A dropdown triggers a change of context as the user moves through the options with a keyboard;
  • A dialogue opens when keyboard focus is moved to a form control.

Official resources

Other resources