WCAG 2.4.3 Focus Order — Testing Guide
WCAG 2.4.3 Focus Order (Level A) requires that the order in which keyboard focus moves through interactive elements is logical and preserves meaning. For keyboard and screen reader users, focus order
WCAG 2.4.3 Focus Order (Level A) requires that the order in which keyboard focus moves through interactive elements is logical and preserves meaning. For keyboard and screen reader users, focus order is the navigation sequence. Random order is disorienting and destroys UX for assistive tech users.
What 2.4.3 requires
The focus order must match the visual and logical order of content. Moving from focus to focus should feel predictable — usually top-to-bottom, left-to-right (RTL reversed for RTL languages).
For multi-column layouts, the order should make sense within reading order, not jump between columns arbitrarily.
Common violations
1. tabindex used to manipulate order
<input tabindex="1">
<input tabindex="3">
<input tabindex="2"> <!-- focus goes here second -->
Using tabindex > 0 is almost always wrong. It overrides natural order, invites bugs.
Fix: Restructure DOM to match desired order. tabindex="0" only if making non-interactive focusable.
2. Absolute-positioned element out of source order
Visually positioned in a different location than its DOM order. Keyboard follows DOM; visual and logical disagree.
Fix: DOM reflects logical order. CSS positioning adjusts visual without changing order.
3. Flexbox / grid reorder
.item:nth-child(3) { order: 1; }
.item:nth-child(1) { order: 3; }
Visual order changes; DOM and focus order do not. User tabs in original DOM order while seeing different visual.
Fix: Reorder in DOM; or accept this is a trade-off and test for usability.
4. Modal / dialog adds focusable but doesn't trap
Focus leaves modal into page behind. User loses context.
Fix: Focus trap within modal until closed.
5. Sidebar after main content in DOM
Header → Main → Sidebar → Footer. But visually, sidebar is alongside main. Focus goes through all of main before sidebar.
Fix: Usually acceptable (screen readers know this pattern). If confusing, restructure or use ARIA landmarks to give users navigation shortcuts.
Testing
Manual
Unplug your mouse. Press Tab repeatedly. Note the order focus moves. Does it match visual order?
Write down the first 20 focus stops. Compare to the order a sighted user would visually scan. Mismatches are violations.
Automated
- axe-core has limited focus-order checks
- Custom tests: script that Tabs through page, recording focused elements; assert order matches spec
Screen reader
VoiceOver rotor / TalkBack reading order should match visual. Test with screen reader; if order feels random, fix.
Fix patterns
Source order matches visual order
The most reliable fix. DOM order → focus order → visual order. One sequence.
Avoid tabindex > 0
Only tabindex="0" (make focusable, keep natural order) or tabindex="-1" (remove from tab order; focus programmatically only).
ARIA landmarks
, , , give users quick jumps. Instead of tabbing through all of main to reach sidebar, landmarks allow direct jump.
Focus after navigation
When user moves to a new page / view, focus should reset — to page heading, to top of content, or to first interactive. Not "start at the element before you navigated."
Focus on state changes
When UI updates in response to user action:
- Show error message → focus moves to error (or error summary)
- Open modal → focus moves to modal's first interactive
- Close modal → focus returns to trigger
- Load more items → focus stays with user's context
- Autofocus on page load → only if intentional (search input on search page)
Sticky elements
Sticky header that stays visible as user scrolls. Tab order: does sticky header tab repeatedly? Should appear once in natural position, not interrupt tab order continuously.
RTL languages
Arabic, Hebrew, Farsi. Visual right-to-left. Focus order should be right-to-left visually, matching reading order.
Edge cases
Multi-column forms
Two-column form. Does focus go column 1 top-to-bottom, then column 2, or across (column 1, column 2, column 1, column 2)? Either is OK if consistent; disclose in label structure.
Data tables
Focus within a data table's interactive cells. Row-by-row or column-by-column? Row-by-row is conventional.
Tabs
Focus on tab → Enter activates → focus moves to tab panel's first interactive. This is standard.
How SUSA tests focus order
For web, SUSA drives Tab through every interactive element and records the focus sequence. Compares to visual positions. Large deviations flagged.
susatest-agent test https://myapp.com --persona accessibility_user
For native, Android's accessibility linear navigation is tested. Out-of-order readings flagged.
Anti-patterns
autofocuson page load for forms where user did not navigate to edit — disorientingtabindex="-1"on a control the user needs to activate — unreachable by Tab- DOM reordered via JavaScript after load — focus order now different from what test saw
- Modal focus lost: modal opens, focus stays on trigger, user cannot tab into modal
Focus order is how keyboard users navigate. Illogical order turns the app into a maze.
Test Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free