Rule library Keyboard and focus

Elements should not have tabindex greater than zero

tabindexBest practice

Ensure tabindex attribute values are not greater than 0

Who this affects

Positive tabindex values are used, which override the natural tab order and usually produce a confusing focus sequence.

How to fix it

Use tabindex="0" or no tabindex at all, and control order with DOM order.

Effort Medium · ~30-60 min

Before and after

Fails

<div class="card" tabindex="3">…</div>

Passes

<div class="card" tabindex="0">…</div>

How to check it by hand

Put the mouse down. Tab from the top of the page to the bottom. Every interactive element must be reachable, must show a visible focus indicator, and you must be able to tab back out of anything you tab into.

Automated testing settles roughly a third of the WCAG success criteria. This rule is one an automated tool detects reliably — but a clean automated result is not proof of conformance.

Reference

Deque's technical write-up for this rule: tabindex

See whether your site trips this rule

Paste a URL. We open it in a real browser, dismiss the cookie wall and run the full EN 301 549 rule set. No account, no card.

Run a free scan All rules