Accessibility · Keyboard and focus

Focusable element with no role

A plain div on this page has tabindex="0", so it takes keyboard focus, but it has no role that tells users what it is or does.

How this page is built

The box below is a div with tabindex="0". It has no role and no behaviour.

A box that takes focus but does nothing.

Why it matters

Elements in the tab order should be things users can act on, with a role that says what they are. A focusable div with no role is announced only as its text, so screen reader users cannot tell whether it is a button, a link or nothing, and keyboard users waste a key press on it.

Accessibility problems matter for search too. Search engines read the same code that screen readers read. Many crawl tools now run accessibility checks next to their SEO checks. A page that works for everyone is easier to use, and people stay on it for longer.

How to check it

Run an automated checker such as axe DevTools, Lighthouse or WAVE, or a crawler with accessibility checks, on this page. axe reports this under the rule focus-order-semantics.

How to fix it

Remove tabindex if the element is not interactive. If it is, use a native <button> or <a href>, or add a suitable role and keyboard handling.

Back to all tests