RatedWithAI

RatedWithAI

Accessibility scanner

WCAG 2.1

2.1.1 Keyboard

Level A success criterion

All functionality must be operable through a keyboard interface.

Why it matters

Many users rely on keyboard navigation or switch devices and cannot use a mouse.

Common violations

  • Custom dropdowns that trap focus
  • Click-only controls without keyboard support
  • Hidden modals with no focus management

Code examples

Bad

<div onClick="openMenu()">Menu</div>

Good

<button type="button" onClick="openMenu()">Menu</button>

How to fix

Use native controls when possible, add keyboard handlers, and ensure focus can move in and out of components.

Related criteria

Related resources

Test & fix this criterion

Use these free tools and guides to check and fix 2.1.1 Keyboard violations:

Scan your site

Check your WCAG coverage in minutes

Start a free scan