Focus order
Also called: Tab order
The sequence in which keyboard focus moves through the interactive elements of a page.
Definition
WCAG 2.4.3 Focus Order, Level A: if a web page can be navigated sequentially and the navigation sequences affect meaning or operation, focusable components receive focus in an order that preserves meaning and operability.
By default the order follows the DOM: the order of elements in the HTML source. CSS that moves things visually (flex order, grid placement, absolute positioning) and a positive tabindex can make focus jump around the screen.
Why it matters
A keyboard user who tabs from a search field to the footer and then back to the search button loses track of the page. Screen magnifier users, who see only a small part of the screen, may not find where focus went at all. A modal that opens without moving focus into it, or a closed menu whose links are still in the tab order, causes the same problem.
How to test or meet it
- Keep the DOM order the same as the visual order, instead of rearranging with CSS.
- Avoid positive
tabindexvalues. - Move focus into a dialog when it opens and back to the button that opened it when it closes.
- Remove hidden content from the tab order (
hidden,display: noneorinert).
Only a person can judge whether an order preserves meaning: tab through every page and template and compare the path with what you see. Tools can point to likely causes, such as positive tabindex values.
WCAG criteria
- 2.4.3 Focus Order (Level A)
- 1.3.2 Meaningful Sequence (Level A)
- 2.4.11 Focus Not Obscured (Minimum) (Level AA)
Related terms
Sources
By the Perceivly team · Published . This explains a term; it is not legal advice.