Overview
All interactive functionality must be operable with a keyboard alone. Users who can't use a mouse depend entirely on keyboard navigation.
Many people can’t use a mouse—users with motor disabilities, tremors, RSI, or those relying on screen readers and switch devices. For them the keyboard is the only way in. If a control can be clicked but not reached with Tab or activated with Enter/Space, that feature simply doesn’t exist for them. Keyboard operability (WCAG 2.1.1) is foundational: nearly every other accessibility feature depends on it working first.
The Problem
This pattern is inaccessible — avoid it.
The Fix
Use this accessible pattern instead.
Step-by-step
Test your page by unplugging your mouse and using Tab, Shift+Tab, Enter, Space, and arrow keys.
Replace div/span click handlers with <button> or <a> elements.
If you must use a custom widget, add role, tabindex="0", and keydown handlers.
Ensure every interactive element can be reached and activated by keyboard.
Don't use tabindex values > 0 — they create confusing tab order.
Common Mistakes
Putting click handlers on <div>/<span> instead of <button>/<a>.
Building custom widgets (menus, sliders, modals) with no keyboard support.
Positive tabindex values that scramble the natural tab order.
Focus traps in modals that the user can’t Tab or Escape out of.
How to Test for It
Unplug your mouse and operate the whole page with Tab, Shift+Tab, Enter, Space, and arrows.
Confirm focus is always visible and never gets trapped.
Run an automated scan, then manually verify every custom widget.
Framework Notes
How to apply this fix in your stack.