Closed ematipico closed 11 months ago
add a note that explains what the user should do: use 0 or -1
I don't think it makes sense to provide a code fix. This seems really unsafe to suggest using 0
instead of the current index.
Since +ve indexes are not recommended to use, the value 0 includes an element in the natural tab order of the content, also this is an unsafe fix for the elements like modal and form errors.
Since +ve indexes are not recommended to use, the value 0 includes an element in the natural tab order of the content, also this is an unsafe fix for the elements like modal and form errors.
Which difference between setting the tab index to 0
and just removing the tabIndex?
Since +ve indexes are not recommended to use, the value 0 includes an element in the natural tab order of the content, also this is an unsafe fix for the elements like modal and form errors.
Which difference between setting the tab index to
0
and just removing the tabIndex?
With tabindex to 0, you make focusable even elements that usually aren't focusable by default. Keeping the tabindex is the safer choice we have.
Since +ve indexes are not recommended to use, the value 0 includes an element in the natural tab order of the content, also this is an unsafe fix for the elements like modal and form errors.
Which difference between setting the tab index to
0
and just removing the tabIndex?With tabindex to 0, you make focusable even elements that usually aren't focusable by default. Keeping the tabindex is the safer choice we have.
Or if anyone sets +ve index on elements like button
, but also at the same time we have to keep in mind that their interaction is handled automatically by the browser.
Description
Documentation: https://biomejs.dev/linter/rules/no-positive-tabindex
We have two options:
0
0
or-1