The WCAG Explained

Simplified and actionable explanations of every WCAG 2.2 criteria

On Focus

Summary:
WCAG 3.2.1, "On Focus," establishes that any component that can be focused by a user should not initiate a change of context. Avoiding that provides a stable and predictable browsing experience. This is crucial for users with visual impairments, cognitive disabilities, or those who rely on keyboard navigation.

What:
This guideline mandates that elements on a webpage, when focused, should not automatically initiate a change in context, like opening a new window, moving focus to another component, or drastically altering the content that the user sees.

Why:
Unexpected context changes upon receiving focus can be disorienting, especially for users who rely on screen readers or keyboard navigation. By preventing such changes, this guideline ensures a more controlled and predictable navigational experience.

Examples and Scenarios:

  1. Form Fields: Focusing on a text input field should not automatically trigger a pop-up window.
  2. Navigation Menus: Focusing on menu items should not instantly open new pages or change the layout.
  3. Interactive Elements: Tabbing to buttons or links should not cause automatic page refresh or redirection.

How to Comply:

  • Websites: Design interactive elements to avoid triggering any change of context when receiving focus.
  • Mobile Apps: Ensure that elements in the app, when focused, do not alter the current context or shift user focus unexpectedly.
  • Software Applications: Implement similar practices to maintain context stability when elements gain focus.

Exceptions:

  • User Expectation: Changes that are part of the element's expected functionality, such as focusing on a 'Play' button in a video player.
  • Essential Context Changes: If the change of context is fundamental to the functionality of the element and can be anticipated by the user.