WCAG 3.2.1: On Focus

Back to all WCAG criteria

OVERVIEW

Effort:

  • Complexity:Easy
  • Duration:Slow

Important for:

Development

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.)

The submit button of a contact form is focused, but the form must not be submitted just because it received focus.

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.

    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.

      Illustration of a glowing light bulb with a friendly, smiling expression.

            Accessible development?

            Our workshop for developers!

            Learn everything you need to know in our workshop to build accessible websites!

            More about the workshop

            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.

            Send us an email!