You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
tabindex should only ever have a value of 0 or -1, except in SUPER RARE exceptions in which case the developer would know enough about tabindex to ignore the linter.
This is an accessibility issue because messing with tabindex messes with keyboard accessibility in ways many developers do not realize.
Describe the solution you'd like
Add a check for tabindex=, then any number following that is greater than 0
Describe alternatives you've considered
It is possible to leave this off because again, there are very, very rare cases where tabindex greater than 0 is warranted, such as a page with a circular structure, but far more common is developers thinking they're helping their page by putting tabindex=1 on the logo at the top of the page, not realizing that this can interfere in cases where, for example, a modal closes and focus should return to where it was before it opened but instead it jumps to the top of the page.
Is your feature request related to a problem? Please describe.
tabindex should only ever have a value of 0 or -1, except in SUPER RARE exceptions in which case the developer would know enough about tabindex to ignore the linter.
This is an accessibility issue because messing with tabindex messes with keyboard accessibility in ways many developers do not realize.
Describe the solution you'd like
Add a check for tabindex=, then any number following that is greater than 0
Describe alternatives you've considered
It is possible to leave this off because again, there are very, very rare cases where tabindex greater than 0 is warranted, such as a page with a circular structure, but far more common is developers thinking they're helping their page by putting tabindex=1 on the logo at the top of the page, not realizing that this can interfere in cases where, for example, a modal closes and focus should return to where it was before it opened but instead it jumps to the top of the page.
Additional context
More info on tabindex: https://webaim.org/techniques/keyboard/tabindex
The text was updated successfully, but these errors were encountered: