Accessibility fix guide
How to fix: Avoid positive tabindex values
A tabindex greater than zero forces an unnatural focus order that confuses keyboard users. Keep the DOM order meaningful and use 0 or -1 only.
The fix
Avoid tabindex values greater than 0; rely on the natural DOM order for focus.
Before and after
Fails
<button tabindex="3">Buy</button>
Passes
<button>Buy</button> <!-- natural DOM order -->
Related fixes
Does your site have this issue?
Scan any page free against WCAG 2.2 AA and get every issue with its fix.
Scan your site free