WCAG 3.2.1: On Focus
Back to all WCAG criteriaOVERVIEW
What's it about?
Setting keyboard focus on an element must not trigger any action that changes the context.
(You can find what a context change is in the notes.)
How to
Depending on your situation, you can implement one of the following options to meet the criterion. For a deeper dive, please refer to the linked WCAG techniques.
Context changes only upon confirmation
A change of context may only occur after an intentional user action. This can be a confirmation using Enter, Space, or a mouse click.

Notes
Exception: Tooltips do not count as a context change
Opening custom tooltips, non-modal popups that close automatically when you tab away or click elsewhere, is not considered a context change.

Exception: What is a context change?
According to the WCAG, a context change is any change on a website that affects the user’s current interaction context without the user explicitly initiating it.
Examples:
-
A modal opens automatically when the page loads.
-
The focus suddenly jumps to another interactive element.
-
Content is loaded dynamically and shifts the visible page (e.g., AJAX content) without the user expecting it.
-
Media plays automatically, or pop-ups appear and interrupt the current action.

-
Accessible development?
Our workshop for developers!
Learn everything you need to know in our workshop to build accessible websites!
Learn accessibility with us?
Looking to implement WCAG best practices in your design, development, or content workflow? Book a workshop for your team or contact us directly to learn more.