tabindex
tabindex should not be greater than 0
manualconfidence: mediumseverity: minoroperable
Checks that tabindex values are 0 or negative, not a positive number.
Applies to. Applies to elements with a tabindex attribute whose value parses as a valid integer.
Expectation. The tabindex value is 0 or negative. A positive tabindex reorders keyboard tab order explicitly, which is fragile to maintain as a page changes and usually indicates the natural DOM order should be fixed instead.
Examples
can't tell
<div tabindex="3">Reordered</div>
A positive `tabindex` pulls this element out of the document's natural tab order and ahead of everything else, which usually surprises keyboard users.
n/a
<div tabindex="0">Focusable</div>
`tabindex="0"` places the element in the natural tab order without reordering anything.