Element in sequential focus order has blur directive
| Field | Value |
|---|---|
| Rule code | Element_Focus_Blur_Detect |
| WCAG conformance level | A |
| WCAG success criterion | 3.2.1 On Focus |
| Must be fixed at source | Yes |
Description
Elements that are part of the sequential focus order must be able to be accessed by the keyboard and not have focus removed until the user moves it.
How to fix
Ensure that focusable elements do not have a scripting directive to move user focus without the user moving it themselves. Focus may be moved to a different control either via the keyboard (e.g. tabbing to a control) or the mouse (e.g. clicking on a field) as long as the user is initiating the change of context themselves. For example, rather than forcing user focus away from a disabled form submit button, i.e. <input type="submit" onFocus="this.blur();"> consider deactivating the element so that it cannot be used until the form is validated and ready to be submitted, i.e. <input type="submit" disabled aria-disabled="true">