Some elements have a [tabindex] value greater than 0
How to fix the tabindex accessibility rule. Keyboard. A best practice, not a WCAG requirement.
The message you saw
Lighthouse runs axe-core inside it, so both are the same check, and the fix below works whichever tool showed you the message.
What it means
When someone presses Tab, the browser moves through links, buttons and fields in the order they appear in the code. A tabindex of 1 or more changes that: every element with a positive tabindex is visited first, from the lowest number up, and only then the rest of the page in normal order.
This message means at least one element has tabindex="1" or higher. It’s a best practice from axe-core, not a WCAG failure on its own, but it very often causes one: the keyboard order no longer matches what people see, which is what success criterion 2.4.3 Focus Order is about.
Who is affected
A tabindex above 0 makes this element come first when people press Tab, so the keyboard order no longer follows the page.
Keyboard users and screen-reader users. Focus jumps around the page in an order that doesn’t match the layout, skips back to the top, or lands on something far from where they were reading. Sighted keyboard users lose track of where focus is; screen-reader users hear the page in a confusing order.
How to find it
- Run the checker; it lists each element with a positive tabindex.
- In the browser console, run
document.querySelectorAll('[tabindex]')and look for values above 0. - Search your templates for
tabindex=andtabIndex={with a number other than 0 or -1.
How to fix it
- Change positive values to
tabindex="0"if the element needs to be focusable (for example a custom control), or remove the attribute if the element is already focusable (links, buttons, inputs). - If the order is wrong without it, fix the order of the HTML so it matches the visual order, rather than forcing it with numbers.
- Use
tabindex="-1"only for elements you move focus to with JavaScript (for example a dialog or an error summary) but that shouldn’t be in the Tab order. - Tab through the page afterwards: focus should move from top to bottom, left to right (for left-to-right languages), following what you see.
Example
Before
<input type="search" aria-label="Search" tabindex="1">
<button tabindex="2">Go</button>After
<input type="search" aria-label="Search">
<button>Go</button>Common mistakes
- Putting
tabindex="1"on a search box so it’s reached first. Visitors then can’t get back to it in a natural order. A skip link is a better way to give fast access. - CSS that reorders the layout (
order,flex-direction: row-reverse, grid placement) also makes the keyboard order differ from the visual order. Fix the source order instead.
WCAG success criteria
None. This is a best practice: fixing it helps people using assistive technology, but it doesn’t affect WCAG conformance. Our scanner only reports it if you tick “Also show best-practice suggestions”.
Check your fix
Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools. Scan again after your change: when the rule no longer appears under the problems, the fix worked.
An automated pass means this rule found nothing wrong. It doesn’t prove the page is accessible: some of what WCAG asks for needs a person to check, and the report’s manual checklist lists those steps.
Related fix guides
- Skip links are not focusable
[accesskey]values are not unique- Scrollable region must have keyboard access
More detail
- Deque University’s reference for tabindex (the makers of axe-core, the engine our scanner uses)
- All fix guides