Positive tabIndex

a11y/tabindex-positivewarningaccessibilitylighthouse

Why it matters

A tabIndex above 0 moves the element ahead of the natural tab order, which confuses keyboard users (Lighthouse: some elements have a tabindex value greater than 0).

Fix

Use tabIndex 0 or -1, and order the DOM instead.

Credit

  • From Deque

    The axe rule tabindex flags tabindex values greater than zero because they override the natural tab order.

  • From W3C Web Accessibility Initiative

    WCAG 2.4.3 requires a meaningful focus order.

References