Focus Order Visualizer

πŸ“– Learn More

Related Guide How to Visualize Keyboard Focus Order β†’

What Is Focus Order Visualizer?

Focus Order Visualizer maps the keyboard tab order of interactive elements on a web page, showing you exactly where focus moves as a user tabs through your site. It’s an essential accessibility testing tool for ensuring that keyboard-only users and screen reader users can navigate your interface logically.

How to Use This Tool

Click Edit HTML and paste your markup. The tool renders it in a sandboxed frame (scripts in the paste do not run) and puts a numbered badge on every element keyboard focus will reach, in the order Chromium tabs through them: positive tabindex values first, then the rest in page order. It skips tabindex="-1", disabled controls, hidden inputs, anything inside an inert region or a closed <details>, and all but one radio button per group; it includes audio and video players with controls and scroll boxes that the keyboard can focus. Warnings below the preview flag positive tabindex, focusable elements inside aria-hidden="true" and those scroll boxes. Everything runs in your browser.

Why Use Focus Order Visualizer?

Tab order issues are invisible during mouse-based testing but create major barriers for keyboard users. This tool makes the focus sequence visible at a glance, helping you catch accessibility problems that automated scanners often miss. It’s free, requires no installation, and runs entirely client-side. For a detailed walkthrough, see our step-by-step guide.

Common Use Cases

Auditing an SPA where the route changes have moved focus into unexpected places between transitions. Diagnosing why screen-reader users skip the "Add to cart" button entirely on a product page where the visual order suggests it should come right after the gallery. Validating that a modal dialog traps focus correctly when it opens and returns focus to the triggering element when it closes.

Reviewing a long-form form for tab-order quirks introduced by responsive reordering — CSS flexbox and grid can visually move elements without touching DOM order, so the keyboard path may not match what the eye expects. Confirming a redesigned navigation menu maintains a sensible reading path. Verifying that carousel arrows, dropdown triggers, and toggle buttons all participate in the tab sequence (or are correctly excluded, when that's the right call).

Worked example: the tool's order against real Tab presses

On October 13, 2026 we built a test page with 31 candidates covering the usual traps (positive tabindex, radio groups, a link without href, disabled controls, display: contents, contenteditable) and the newer ones (inert, a closed <details>, content-visibility, keyboard-focusable scrollers, media controls). We ran the old ordering code and the rebuilt one on it, then pressed Tab through the same page in Chromium 141 and recorded every element that took focus. The page and scripts are in our repository (_ops/checks/focus-order/).

CaseOld toolTool nowChromium 141, Tab
tabindex="1", then tabindex="2"1st, 2nd1st, 2nd1st, 2nd
Button inside an inert containerListedSkippedSkipped
Button inside a closed <details>ListedSkippedSkipped
Button inside content-visibility: hiddenListedSkippedSkipped
contenteditable span inside a contenteditable divTwo stopsOne stopOne stop
<span tabindex="abc"> (not a number)ListedSkippedSkipped
Scroll box with no focusable childMissingListed (and warned)Focused
<video controls>, <audio controls>MissingOne stop eachSame; audio took 2 presses (its play button, then the rest of its controls)
Radio groups, open <details>, display: contents, disabled fieldset with a legend inputRightRightSame
Button inside aria-hidden="true"ListedListed + warningFocused (and announced as nothing)
Whole page22 stops: 5 extra, 3 missing20 stops, same order20 stops

Frequently Asked Questions

What is focus order?+
Focus order is the sequence in which interactive elements receive keyboard focus when pressing Tab. A logical focus order follows the visual layout and reading order, ensuring keyboard users can navigate efficiently.
Why does focus order matter?+
Many users navigate with keyboards, screen readers, or switch devices. If focus order is illogical β€” jumping around the page randomly β€” these users cannot efficiently use your interface. WCAG 2.4.3 requires meaningful focus order.
What elements are focusable?+
Without a tabindex: links and image-map areas with href, buttons, input (except type=hidden), select, textarea, iframe, the summary of a details element, audio and video with controls, and contenteditable regions; Chrome 130+ also lets the keyboard focus a scroll box that has nothing focusable inside. Any element with tabindex="0" joins the order where it sits in the source; tabindex="-1" makes it focusable by script only.
How do I fix focus order issues?+
Ensure DOM order matches visual order. Avoid positive tabindex values (tabindex=1, 2, etc.) as they override natural order. Use CSS for visual positioning while keeping the DOM in logical reading order.
How does the visualizer compute focus order?+
It walks the pasted markup in source order inside a sandboxed frame and applies the HTML Standard's rules plus Chromium's specifics: tabindex parsing, disabled controls and fieldsets, hidden and unrendered elements, inert regions, closed details, content-visibility, one stop per radio group, media controls and focusable scroll boxes. On our 31-candidate test page its order matched real Tab presses in Chromium 141 exactly (20 of 20 stops). Scripts in the paste do not run, so focus changes made by JavaScript are not shown.
Does the tool detect positive tabindex values?+
Yes: each element with tabindex="1" or higher is listed in the Warnings box, because it is reached before everything in source order. Positive tabindex is almost always a mistake; tabindex="0" and tabindex="-1" are fine.
What about elements with display:none or visibility:hidden?+
Both remove an element from the focus order, and the tool skips them, as it does content inside inert regions, closed details elements and content-visibility: hidden. aria-hidden="true" does not remove focus: such elements stay in the order and the tool warns about them.
Can I export the visualisation as a screenshot?+
There is no built-in export, but the numbered overlay is designed to be screenshotted: capture the preview with your system screenshot tool for audit reports and design reviews.

Built by Derek Giordano · Part of Ultimate Design Tools

Privacy Policy · Terms of Service