positive-tabindex
This fails the run. Where it is wrong about your code, // ramonda-check-ignore <reason> on the line says so, and the reason is printed on every run.
Reported when a tabIndex is above zero, which reorders the whole document rather than one element.
A positive tabIndex does not move one element — it creates a second tab order that runs
before the whole document's. One number in one component reorders every page it appears on,
and what breaks is the file nobody edited.
tabIndex={0} puts an element in the tab order where it sits, which is almost always what
was meant. tabIndex={-1} takes it out while leaving it focusable from script, for a thing
you focus yourself. To change the ORDER, change the order of the markup.
Next
- All rules — the other checks this one runs beside.
- Checking your app — how to run it, and what it proves.