Back to overview
Contents
3.2.1
—
On Focus
Maintain Context on Focus
Ensure that navigating to or focusing on an element does not unexpectedly change the user’s current context.
Acceptance Criteria
When a user interface element gains focus, the context or page does not change unexpectedly.
Examples
- Clicking on a form field should not navigate the user away from the current page or open a new window.
- Focusing on a button should not automatically submit a form or initiate a different action without explicit user input.
Exceptions
Context change may be acceptable if it is part of the intended functionality, such as opening a modal with additional information that the user expects.
Tips
- Clearly indicate any actions that will result in a context change so users are prepared.
- Test with various assistive technologies to ensure that focus changes do not disrupt users’ workflows.
How to test?
- Navigate through interactive elements on a page and ensure that focusing on these elements does not trigger unexpected changes in the content or user interface.
- Use assistive technologies, like screen readers, to verify that focus management does not cause unintended context shifts.