Keyboard navigation is the ability to operate a website using only a keyboard — no mouse. Users press Tab to move between links, buttons, and form fields, and Enter or Space to activate them. It’s a foundational WCAG 2.1 AA requirement and one of the most common — and most fixable — accessibility failures on the web.
Why keyboard access matters
A large share of people who depend on accessible websites never touch a mouse. That includes users with motor disabilities, tremors, or limited dexterity; people with low vision who can’t track a cursor; and anyone using a screen reader like NVDA, JAWS, or VoiceOver, which drives the page through keyboard commands. Switch devices, sip-and-puff controls, and voice-input tools also map to the keyboard interface under the hood.
When keyboard support breaks, these users simply can’t complete the task — they can’t add to cart, submit a contact form, or open a menu. That maps directly to the POUR principles behind WCAG: content must be Operable, and success criterion 2.1.1 (Keyboard) is explicit that all functionality be available from a keyboard.
It’s also a legal exposure. Thousands of ADA web accessibility lawsuits and demand letters are filed each year in the US, and broken keyboard operability is a frequent, easy-to-prove complaint. Courts have effectively adopted WCAG 2.1 AA as the benchmark for ADA Title III, and federal agencies are bound by Section 508, which references the same WCAG criteria. The DOJ has repeatedly affirmed that the ADA applies to websites. (This is general information, not legal advice — talk to an attorney about your situation.)
Tab order and focus order
Focus order is the sequence in which interactive elements receive focus as the user presses Tab. WCAG 2.4.3 (Focus Order) requires that order to be meaningful — it should match the visual and logical reading order of the page.
In practice, the keyboard follows the DOM order (the order elements appear in your HTML), not the visual order created by CSS. Problems creep in when:
- A CSS layout (flexbox
order, absolute positioning, grid placement) moves content visually but leaves it out of order in the source. - Positive
tabindexvalues (tabindex="1",tabindex="2") are used to force an order, which almost always backfires and creates a confusing path. - Off-screen or hidden content still receives focus, sending the user somewhere invisible.
The reliable fix is to put elements in the correct source order and avoid positive tabindex. Use tabindex="0" only to make a custom interactive element focusable, and tabindex="-1" to remove an element from the tab sequence while still allowing focus to be set programmatically.
tabindex value | Effect |
|---|---|
tabindex="0" | Element joins the natural tab order in DOM position |
tabindex="-1" | Focusable by script only; skipped by Tab |
tabindex="1" or higher | Jumps ahead of everything — avoid; breaks focus order |
Visible focus indicators
A focus indicator is the visible outline that shows which element currently has keyboard focus. Without it, a keyboard user has no idea where they are on the page. WCAG 2.4.7 (Focus Visible) requires that focus always be visible.
The single most damaging line of CSS for accessibility is:
*:focus { outline: none; }
That removes the indicator everywhere. If the default outline clashes with your design, style it — don’t delete it:
:focus-visible {
outline: 3px solid #1a5fb4;
outline-offset: 2px;
}
Use :focus-visible so the ring appears for keyboard users without showing on every mouse click. Make sure the indicator has enough color contrast against both the element and its background, and is at least two pixels thick so it’s genuinely noticeable.
Skip links
A skip link is a “Skip to main content” link, usually the very first focusable element on the page. It lets keyboard and screen reader users jump past the header and navigation — which can be dozens of Tab presses — straight to the main content. It satisfies WCAG 2.4.1 (Bypass Blocks).
A skip link is typically hidden until it receives focus, then becomes visible:
<a href="#main" class="skip-link">Skip to main content</a>
...
<main id="main"> ... </main>
Test it by loading a page fresh and pressing Tab once — the link should appear. A skip link that’s permanently hidden (with display: none) never gets focus and doesn’t help anyone.
Keyboard traps
A keyboard trap (WCAG 2.1.2) is any place where focus goes in but can’t get back out using the keyboard. The user is stuck and often has to reload the page. Traps usually appear in:
- Modals and dialogs that don’t return focus to the page when closed, or never let
Tabcycle out. - Date pickers, carousels, and sliders built as custom widgets without keyboard handling.
- Embedded third-party content — chat widgets, video players, ad iframes.
Modals are a special case: done right, focus should be moved into the dialog when it opens, trapped intentionally inside it (so Tab cycles through the dialog’s controls), closed with Esc, and returned to the triggering element when dismissed. The distinction is that a proper modal lets you escape with Esc or a Close button; a broken one offers no keyboard way out at all. Managing this correctly is a core part of accessible navigation and focus management.
Making custom widgets keyboard-operable
Native HTML elements — <button>, <a href>, <input>, <select> — are keyboard-accessible for free. The trouble starts when teams rebuild these with <div> and <span>, which have no keyboard behavior at all.
If you must build a custom control, you have to recreate three things native elements give you automatically:
- Focusability — add
tabindex="0"so it can receive focus. - Operability — wire up
EnterandSpace(and arrow keys for composite widgets like menus and tabs). - Semantics — apply the right ARIA role and state so a screen reader announces it correctly.
Our guide to ARIA labels and roles covers the semantics side; the safest rule of thumb is to use a native element whenever one exists. Recreating a button rarely ends well.
How to test keyboard accessibility
You don’t need special software to find most keyboard problems — the keyboard is the test. Set the mouse aside and work through the page.
Tabfrom the top. Every interactive element should be reachable, in a logical order, with nothing skipped and nothing hidden receiving focus.Shift+Tabto move backward and confirm the reverse path is sane.- Watch the focus ring at all times. If you lose it, that’s a 2.4.7 failure.
- Activate everything with
Enter/Space, arrow keys for menus and sliders, andEscto close overlays. - Stress the widgets — open every modal, dropdown, date picker, and embed, and confirm focus moves in and out.
This manual pass catches issues that automated scanners miss entirely. Tools like axe or Lighthouse flag missing labels and some focus problems, but they can’t judge whether your focus order makes sense or whether a modal is actually escapable — that takes a human. It’s exactly why manual testing beats automated-only checks for keyboard accessibility.
Why overlays don’t fix this
Accessibility overlay widgets — accessiBe, UserWay, AudioEye and similar — promise one-line compliance, but they can’t repair keyboard navigation. Focus order, missing focus indicators, keyboard traps, and non-operable custom widgets are structural problems baked into your HTML and JavaScript. A script layered on top at page load can’t reliably rewrite that structure, and in many cases overlays introduce their own keyboard traps. That’s why overlays don’t ensure ADA compliance and why courts and disability advocates have rejected them.
The durable fix is manual remediation: correcting the source code so the keyboard works the way it should. That’s what we do at Curbcut — real, hand-built fixes, never an overlay.
Get your keyboard issues fixed
Keyboard access is one criterion among the dozens that make up WCAG 2.1 AA, but it’s a make-or-break one. If you’d rather not test and rewrite every menu, modal, and form by hand, start with a free accessibility scan to see where you stand, or have our team handle the whole picture with a thorough website accessibility audit. For deeper standards background, the W3C Web Accessibility Initiative, WebAIM, ADA.gov, and Section508.gov are reliable references.