Skip to content

Rule · Lint

Clickable <div>/<span> without button semantics

lint/div-buttonwarnvoid lintupdated

Why it matters

A div with onClick is invisible to keyboards and screen readers: it can't be focused with Tab, doesn't fire on Enter/Space and isn't announced as a button.

How to fix it

Example

References

void lint reports 67 rules in this category. Static source checks with no browser: Tailwind v4 silent failures, Next.js 16 API traps, React render-body bugs, accessibility markup, SEO files and motion hygiene.