Keyboard navigation impossible
The issue
Keyboard navigation is a fundamental pillar of web accessibility. WCAG success criterion 2.1.1 requires that all functionality be operable through a keyboard interface, without depending exclusively on the mouse or touch. Yet a considerable number of modern websites build interactions that only work with a mouse: dropdown menus that only open on hover, buttons built with div or span instead of button, carousels without keyboard controls, modals that do not close with Escape, tabs without arrow key support. When an interactive element is not keyboard-accessible, the user who depends on the keyboard is blocked. They cannot click that button, open that menu, close that modal, or navigate that carousel. Their journey on the site stops immediately. This problem is particularly insidious because it is invisible to developers who test exclusively with a mouse. A div-based button may seem to work perfectly — it has the right visual, the right cursor, the right click behavior. But it is completely transparent to the keyboard: it does not receive focus with Tab, does not trigger with Enter, and is not announced as a button by screen readers. Modern JavaScript frameworks (React, Vue, Angular) often worsen this problem by encouraging the use of div with onClick instead of semantic HTML tags. A native HTML button is natively focusable, keyboard-activatable, and correctly announced by screen readers. A div with onClick does none of that without significant extra work (adding tabindex, role, keydown handling). The solution is almost always the same: use native HTML elements (button, a, input, select) rather than reinventing the wheel with divs.
Does your site have this issue?
106 RGAA criteria analyzed in 5 minutes by our AI.
Impact on users
People with motor disabilities who cannot use a mouse depend entirely on the keyboard (or an input device emulating the keyboard, such as a switch, voice control, or eye tracker). For these users, a non-keyboard-navigable site is an unusable site — as inaccessible as a building without a ramp for a wheelchair user. Blind people using a screen reader also navigate exclusively by keyboard. If an interactive element cannot receive focus, it simply does not exist for them. Power users also use the keyboard by preference for its speed. Developers, data entry professionals, and anyone with a temporary wrist tendinitis are also affected. Worldwide, hundreds of millions of people have motor disabilities of the upper limbs that can make mouse use difficult or impossible.
Code example
<div class="menu-toggle" onclick="toggleMenu()">
Menu
</div>
<div class="dropdown" onmouseover="showDropdown()">
<span>Services</span>
<div class="dropdown-content" style="display:none">
<div onclick="navigate('/consulting')">Consulting</div>
<div onclick="navigate('/audit')">Audit</div>
</div>
</div><button type="button" class="menu-toggle" onclick="toggleMenu()">
Menu
</button>
<div class="dropdown">
<button type="button" aria-expanded="false" aria-haspopup="true"
onclick="toggleDropdown(this)" onkeydown="handleDropdownKey(event)">
Services
</button>
<ul role="menu" class="dropdown-content" hidden>
<li role="menuitem"><a href="/consulting">Consulting</a></li>
<li role="menuitem"><a href="/audit">Audit</a></li>
</ul>
</div>Frequently Asked Questions
How do I test keyboard navigation on my site?
Why not just use tabindex to make a div focusable?
Are hover-only menus accessible?
Must carousels be keyboard navigable?
Does your site have this issue?
Scrutia audits your site against WCAG 2.1 AA criteria in 5 minutes. Keyboard navigation, ARIA components, visible focus, contrasts, and much more.
Run a free audit