跳至主要內容
What's New

8.25 WCAG 2.2 Success Criterion 3.2.1 − On Focus

When an item on a webpage receives focus, such as by using the Tab key in the keyboard, ensure it does not initiate a change the context. For example, by displaying a dialogue box when a person tabs to a field.

Before Rectification

A web form sample where information appear after the mouse cursor focuses on one of the form fields.

The example above, a field receives focus, and a help dialogue box describing the field and providing options opens. As a keyboard user tabs through the webpage, the dialogue opens, moving the keyboard focus away from the control every time the user attempts to tab past the field.

After Rectification

A web form sample allows the user to use a help button.

Instead, the webpage should allow the user to activate “Help” only at their choice rather than forcing them to read “Help” with each tabbed field.

WCAG 2.2 Reference:

https://www.w3.org/WAI/WCAG22/Understanding/on-focus