Will It Vibe logoWill It Vibe?
REACT-020Medium severity-8 points

onClick on a non-interactive element without a role

Part of Documentation, UX & Accessibility, which counts for 15% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.

What it detects

Putting onClick on a div or span with no role and no keyboard handler creates a control that keyboard and screen-reader users cannot reach or activate. Use a button, or add role plus tabIndex and a key handler.

Why it matters

Putting onClick on a div or span with no role gives you a control that only works with a mouse. Keyboard users cannot tab to it or press Enter, and screen readers do not announce it as interactive, so the feature is invisible and unusable for people who rely on assistive technology. It also fails WCAG keyboard requirements.

How to fix it

Use a real <button> for click actions, which brings focusability, keyboard activation, and the correct role for free. If it must stay a div, add role="button", tabIndex={0}, and an onKeyDown handler that activates on Enter and Space, plus a visible focus style.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Documentation, UX & Accessibility checks