tabindex value greater than 0 implies an explicit navigation ordering.
Although technically valid, this often creates frustrating experiences
for users who rely on assistive technologies.
Lighthouse reports when some elements have a
tabindex value greater than 0:
How to fix this problem
tabindex greater than 0 is considered an anti-pattern
because screen readers navigate the page in DOM order, not tab order.
tabindex greater than 0 jumps the element to the front of the natural tab order.
This unexpected tab order can give the appearance of skipping some elements entirely.
If you have a
tabindex greater than 0,
and you're using a native element,
tabindex all together.
Native HTML elements such as
have keyboard accessibility built-in for free.
If you're using custom interactive components,
tabindex to zero.
<div tabindex="0">Focus me with the TAB key</div>
If you need an element to come sooner in the tab order, it should be moved to an earlier spot in the DOM. Learn more in Control focus with tabindex.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.