Focus Order
Focus order is the sequence in which keyboard navigation reaches interactive elements, preserving meaning and operability as users move through an interface.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/focus-order/
01What it means
Focus order describes sequential keyboard navigation, usually produced by document order and native focusability. A logical order follows meaningful reading and task progression without requiring it to match every visual arrangement exactly. It is one part of focus management, not a license to force focus through all content.[1][2]
- 01Meaningful DOM orderReading and task sequence
- 02Native focusabilityLinks, buttons, fields, controls
- 03Tab forwardMove between components
- 04Shift + TabReverse the same logical path
- 05Responsive + dynamic testZoom, errors, updates, breakpoints
Composite widgets use their own conventional arrow-key navigation; Tab should not be forced through every piece of content.
02Why it matters
Keyboard and screen-reader users rely on predictable sequence to understand context and operate controls. When visual layout, document order, and programmatic focus diverge, users may encounter actions before labels, jump between regions, or lose the task's structure.
03When to use it
Review focus order for every page and component, especially responsive layouts, CSS reordering, dialogs, menus, error summaries, and dynamically inserted content. Prefer meaningful source order and native navigation over positive tabindex values.
04How it works
- Arrange source content in a meaningful reading and task order before applying visual layout.
- Use native interactive elements so ordinary Tab and Shift+Tab behavior emerges naturally.
- Define arrow-key navigation separately for composite widgets such as tabs or radio groups.
- Move focus programmatically only when a context change would otherwise leave users lost.
- Test forward and reverse order at responsive breakpoints, high zoom, errors, and dynamic updates.
05A practical example
At a narrow breakpoint, an order summary moves visually above a checkout form. The DOM remains meaningful, form fields follow their headings, the summary is not inserted into every Tab stop, and an error summary moves focus only after unsuccessful submission.
06Where it breaks
A logical sequence can still be inefficient if too many elements are focusable. Screen readers also provide heading, landmark, and browse navigation beyond Tab order, while composite widgets intentionally manage focus using different keys.
Common mistakes
- Using positive tabindex values to patch an illogical document structure.
- Assuming CSS visual order automatically changes sequential focus.
- Putting noninteractive text into the Tab sequence unnecessarily.
- Testing forward Tab only and missing reverse or responsive failures.
07Sources
- Understanding Success Criterion 2.4.3: Focus OrderW3C Web Accessibility Initiative · Standards guidanceUnderstanding Success Criterion 2.4.3: Focus Order
- Developing a Keyboard InterfaceW3C Web Accessibility Initiative · Technical guidanceDeveloping a Keyboard Interface