HighWCAG 2.1.1 · Level AOperable
Unreachable Clickable Custom Control
Catches non-interactive elements (like <div> or <span>) that have click listeners but lack tabindex attributes or keyboard event handlers.
Rule ID: custom-keyboard-nav-missing · reported under Needs review, because a person should confirm it.
Who this affects
Keyboard and switch users, and many screen-reader users, cannot reach or use the control.
WCAG 2.1.1 Keyboard: read the W3C explanation of Keyboard
How to fix it
Problem
<div onclick="submitOrder()" role="button">Buy Now</div>Fixed
<div onclick="submitOrder()" role="button" tabindex="0" onkeydown="if(event.key==='Enter'||event.key===' '){submitOrder();}">Buy Now</div>These are short examples. In the extension, A11yEngine points to the element on your own page and can suggest a fix for your code (HTML, React, Vue or Tailwind).
Find this on your own pages
Check any page for this and 100+ other issues in your browser, free.