Focus Order & Tab Flow Visualizer
Paste HTML to see computed keyboard tab order, focus anomalies and tabindex anti-patterns.
HTML to inspect
Computed tab order
Paste HTML to inspect its tab order
Scripts and network resources are stripped before rendering.
Details
Keyboard navigation bugs are hard to infer from markup. Paste an HTML snippet and this tool lists every focusable element in the order a browser would tab through it: positive tabindex values first in ascending order, then natural DOM order. Hidden, disabled, inert and negative-tabindex elements are listed separately with the reason they were excluded. Anti-pattern checks flag positive tabindex chains, aria-hidden on focusable elements, duplicate ids and scroll-container focus styles, each with a plain-language fix. The preview is rendered in a sandboxed iframe with scripts and external resources stripped, so only static markup is analyzed — JavaScript-driven order changes and shadow-root contents are outside scope. Step forward or backward through the sequence and export the findings as Markdown for a ticket.
More examples
Modal audit
<div role="dialog">
<button tabindex="3">Save</button>
<button aria-hidden="true">Close</button>
<button>Cancel</button>
</div>Save hijacks the order and Close is focusable but silenced; both are flagged with fixes.
Hidden menu
<div style="display:none"><button>Hidden</button></div>
<button>Visible</button>The hidden item is excluded and listed with the reason, so the visible button is step 1.
Reverse traversal
Step through: A → B → C
Reverse: C → B → AShift+Tab-style stepping often reveals order regressions that forward tabbing hides.
Examples
Positive tabindex
<a href="/two" tabindex="1">Two</a><a href="/one">One</a>1. Two · 2. OneThe positive value jumps ahead of markup order.
Silenced button
<div aria-hidden="true"><button>Close</button></div>error: aria-hidden on focusableKeyboard and screen-reader experiences diverge.
Hidden item
<div style="display:none"><button>Hidden</button></div>Excluded: hidden by display:noneInvisible controls cannot be tabbed to.
About this tool
Focus Order & Tab Flow Visualizer computes the keyboard tab sequence for a pasted HTML snippet. Focusable elements are numbered in browser order: positive tabindex values first, then natural DOM order, with hidden, disabled, inert and negative-tabindex elements listed separately.
The anti-pattern pass flags positive tabindex chains, focusable elements inside aria-hidden subtrees, duplicate ids and scrollable containers without visible focus treatment. Each finding carries a fix you can paste into a ticket.
Markup is sanitized and rendered in a sandboxed iframe with a restrictive content-security policy and no external resources. Only static order is analyzed — JavaScript-driven focus changes and shadow-root contents are outside scope.
What this tool does not do
- Only static, sanitized markup is analyzed; JavaScript-shown elements and shadow roots are not reflected.
- Browser focusability differs at the edges; the conservative selector may disagree with an exotic engine.
- The preview cannot fetch external stylesheets or images, so layout-dependent behavior is not reproduced.
- Wrap-around focus traps in scripted modals are not detected; reverse stepping is an aid, not proof.
How to use this tool
Paste markup
Use a component snippet, modal or full page body; scripts and event handlers are stripped automatically.
Read the numbered order
Each badge shows the element and why it appears in that position; click one for its tabindex and inclusion reason.
Review findings
Errors, warnings and notes include plain-language fixes for tabindex and aria-hidden problems.
Step and export
Simulate Tab or reverse traversal, then copy the Markdown report into your accessibility ticket.
Use cases
Modal reviews
Check close/save/cancel order before shipping a dialog.
Design systems
Verify that widget tabindex patterns do not hijack page order.
Ticket evidence
Export a Markdown sequence and findings for an accessibility bug report.
Ordering rules
| Element state | Tab position |
|---|---|
| tabindex="2" | First group |
| tabindex="0" or native | DOM order |
| tabindex="-1" | Excluded |
| display:none / hidden / inert | Excluded |
| aria-hidden ancestor | Included + error |
The preview iframe has no scripts and cannot fetch subresources.
Common mistakes
Mistake:Using positive tabindex to match visual order.
Fix:Reorder the DOM instead; positive values affect the whole document.
Mistake:Putting aria-hidden on a focusable control.
Fix:Remove aria-hidden from the control or take it out of the tab order.
Mistake:Assuming JavaScript-driven focus changes are analyzed.
Fix:Scripts are stripped; test dynamic widgets in a real browser too.
Mistake:Ignoring excluded elements.
Fix:Review the excluded list — a control hidden by CSS may still be needed.
Frequently asked questions
How is tab order computed?
Elements with positive tabindex come first in ascending numeric order, followed by naturally focusable elements in DOM order. Negative tabindex, disabled, hidden, inert and contenteditable=false elements are excluded and listed with the reason.
Why is my button skipped?
Check the Excluded list. Common causes are a hidden or inert ancestor, display:none from inline style, a disabled control or ancestor fieldset, or tabindex="-1" which makes the element script-focusable but not part of the Tab sequence.
Are positive tabindex values always wrong?
In almost every page-level case, yes. A positive value inserts an element into a global order that is hard to maintain and ignores document flow. Reorder the markup so natural DOM order matches the visual order instead.
Does the preview run scripts from my HTML?
No. Scripts, event handlers and javascript: URLs are stripped, external subresources are blocked by a content-security policy, and the iframe runs without allow-scripts.
Can it detect focus traps in JavaScript modals?
Not fully. The tool detects static anti-patterns and lets you step forward and backward through the declared order, but wrap-around logic implemented in scripts must be verified in a real browser.
Is my pasted HTML uploaded?
No. Sanitization, analysis and the sandboxed preview all happen in your browser tab; nothing is sent over the network.
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.gitattributes Generator
Build .gitattributes rules for line endings, Git LFS, GitHub linguist marks and merge drivers — with a one-line explanation for every rule.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
A/B Test Sample Size Calculator
Compute required sample size per variant and test duration from baseline conversion rate, minimum detectable effect, alpha and power.
ABA Routing Number Validator
Validate 9-digit US ABA routing numbers with 3-7-1 Mod-10 breakdown.