Rule
Redundant tabindex
tabindex="0" is unnecessary on natively focusable elements.
- Rule
redundant-tabindex- Type
- Best practice, not a WCAG requirement. It runs when Best practices is switched on.
- Severity
- Minor
What it checks
The rule fails tabindex="0" on an element that the keyboard can already reach: a <button>, a link with an href, an <input>, <select>, <textarea> or <summary>.
The attribute changes nothing for keyboard users. It is markup to maintain, and can hide the fact that the element was once something else.
Example
Fails
<button type="button" tabindex="0">Show more</button>
Not reported
<button type="button">Show more</button>
The engine is tested against both examples.
How to fix it
Remove the tabindex attribute.
Check your own pages
This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.