Warning Positive tabindex value
Why tabindex values above 0 override the browser's natural tab order, and the confusing keyboard navigation that results.
The validator flags any element with a tabindex attribute set to a value greater than 0.
Example
<!-- Flagged: forces this field to be tabbed to first -->
<input tabindex="1">
<!-- Right: 0 makes an element focusable in natural source order -->
<div tabindex="0" role="button">Custom control</div>
<!-- Right: rely on the default tab order for native controls -->
<input>Why it matters
By default, the Tab key moves focus through a page in source order, which usually matches the visual reading order. A positive tabindex pulls an element out of that order and gives it explicit priority — 1 before 2, 2 before 3, and so on — ahead of every element with no tabindex at all. On any page with more than one positive value, keeping the numbering consistent as the page evolves becomes fragile, and a single stray value creates a jarring jump in the tab sequence that has nothing to do with the visual layout. tabindex="0" is different and unaffected by this warning — it makes an otherwise non-focusable element (like a <div> acting as a button) focusable in its natural document-order position, which is the standard way to build accessible custom controls.
Frequently asked questions
Is tabindex="0" also a problem?
No — tabindex="0" is the recommended way to make a non-interactive element focusable in its normal source-order position, and is not flagged by this check. Only positive values (1, 2, 3, ...) are, since those are the ones that override ordering.
What should I use instead of a positive tabindex to reorder focus?
Reorder the actual HTML source so the DOM order matches the desired tab order. This keeps tab order correct without a separate, hard-to-maintain numbering scheme layered on top of the markup.