Click handler on a non-interactive element without a key handler
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 on:click on a div or span with no keyboard handler and no role creates a control that keyboard and screen-reader users cannot reach or operate. Svelte warns on this. Use a <button>, or add role, tabindex, and an on:keydown handler.
Why it matters
Putting on:click on a div or span with no keyboard handler and no role builds a control that only works with a mouse. Keyboard users cannot tab to it or activate it, and screen-reader users are never told it is interactive, so the feature is unreachable for them. Svelte flags this in its accessibility warnings.
How to fix it
Use a real <button> for click actions, which gives you focusability, Enter and Space activation, and the right role for free. If it must stay a div or span, add role="button", tabindex="0", and an on:keydown handler that activates on Enter and Space so keyboard users reach the same behavior.
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