Tab-Order Visualizer

Paste HTML and see the keyboard focus sequence numbered in document order.

Ad placeholder (leaderboard)

The Tab-Order Visualizer shows you, in plain numbered order, exactly which elements a keyboard user will reach by pressing Tab — and in what sequence. A logical, predictable focus order is a core part of an accessible page, and the most common bug is a stray positive tabindex that silently reorders the whole page.

How it works

The tool parses your HTML and collects every element that is keyboard-focusable:

  • a with an href
  • button, input, select, textarea (unless disabled)
  • any element with contenteditable
  • any element with a non-negative tabindex

Elements with tabindex="-1" and disabled controls are excluded because the Tab key never reaches them.

It then sorts them using the same rule the browser applies:

  1. First, all elements with a positive tabindex, in ascending numeric order (ties broken by document order).
  2. Then, all elements with tabindex="0" or no tabindex, in document order.

Each element is shown with its computed sequence number, tag, and a label drawn from its text, aria-label, value, or name. Positive-tabindex elements are highlighted as warnings.

Example

<a href="/a">First link</a>
<button tabindex="2">Pulled to front</button>
<input type="text" name="email">

The button has tabindex="2", so it is visited before the link and input even though it appears second in the markup. The visualiser numbers the button 1 and flags it, making the reordering obvious.

Tips

  • The fix for a flagged positive tabindex is almost always to remove it (or set it to 0) and let DOM order do the work.
  • If the focus order looks wrong but no positive tabindex is flagged, your visual layout probably differs from your source order — reorder the markup.
  • Use this alongside a focus-indicator contrast check so every reachable element is also clearly visible when focused.
Ad placeholder (rectangle)