Warning

Elements use a positive tabindex

The short version

Use tabindex 0 or -1 and the document order.

What it means

Some elements have a tabindex of 1 or more. A positive tabindex moves the element to the front of the keyboard tab order, ahead of everything that follows the page's natural order. The examples show each element.

Why it matters

Keyboard users move through a page with Tab. Positive values make focus jump around unpredictably, skipping parts of the page and then coming back, which is confusing and easy to get wrong as pages change. WCAG 2 success criterion 2.4.3 asks for a focus order that preserves meaning.

How to fix it

  1. Remove the positive tabindex values.
  2. Arrange the HTML so its source order is the order people should move through it.
  3. Use tabindex="0" to make a custom control focusable in the normal order.
  4. Use tabindex="-1" only for elements you focus from a script, such as a dialog heading.
  5. Better still, use native elements such as <button> and <a href>, which are focusable already.

Check it worked

Run the accessibility check again on the same address. The finding should be gone. Then try the page yourself with only the keyboard, and if you can, with a screen reader such as NVDA or VoiceOver: automated checks find only some problems.