How to Audit Links for Keyboard Users

Audit links with a keyboard: check focus visibility, activation, skip links, menus, and focus order with a practical checklist for frontend teams.

Published
Reading time
8 min read
How to Audit Links for Keyboard Users
On this page

A keyboard accessibility link audit checks whether people can find, reach, activate, and leave links without a mouse. Use this checklist on representative pages and interactive states, including navigation menus, skip links, and content revealed on focus.

Key Takeaways

  • Tab through the page, activate links with Enter, and check that focus remains visible and can move onward.
  • Use links for navigation and buttons for actions. A clickable element is not automatically a keyboard-accessible link.
  • Check focus order and visibility when menus open, dialogs appear, or content is hidden.
  • A keyboard-only check is valuable but does not replace screen-reader testing or a full accessibility evaluation.

Set up the audit

Choose representative pages and states: a landing page, a long content page, a page with a menu, and any page with a dialog or dynamically updated content. Include desktop and responsive layouts where their navigation differs.

Use a desktop browser with a physical keyboard. Disconnect the mouse if helpful, but keep developer tools available for diagnosis. Browser and operating-system settings can affect whether Tab reaches links; check those settings if links appear to be skipped. Start each test at the top of the page, then repeat with menus or other controls open.

Record the page, browser, viewport, steps, expected result, and actual result for each issue. A short screen recording can make an intermittent focus problem easier to reproduce.

Keyboard controls to use

  • Tab: move forward through focusable controls.
  • Shift+Tab: move backward.
  • Enter: activate the focused link.
  • Space: normally activates a focused button; it is not a substitute for Enter on a link.
  • Escape: check whether it closes an open menu or dialog when the component is designed to support it.

Advertisement

  • Press Tab repeatedly from the start of the page. Can you reach every link that is currently available to users?
  • Use Shift+Tab to move backward. Does focus follow a sensible reverse order?
  • Check links in the header, main content, sidebar, footer, and any opened navigation panel.
  • Confirm that collapsed or hidden content does not leave invisible links in the Tab sequence.
  • Check that links revealed only on hover are also available when using the keyboard.

A link should have a meaningful destination, typically expressed as an <a href="...">. An anchor without href, a <span> with a click handler, or a styled <div> may look like a link but is not equivalent to a native link.

2. See where focus is

  • As you tab, can you identify the focused link at every step without relying on a hover effect?
  • Check focus against different backgrounds, images, selected states, and sticky headers.
  • Zoom in and repeat. Make sure scrolling or fixed overlays do not entirely cover the focused link.
  • Check that the indicator is distinguishable in forced-colors or high-contrast display settings where available.
  • If a link is visually hidden until focused, verify that it becomes visible when reached.

Do not remove the browser outline without providing a clear replacement. An indicator that works on a white background may disappear against a dark card or image, so inspect it in context.

  • Press Enter on each representative link. Does it go to the expected destination or page section?
  • After an in-page link, check that the destination is apparent and that the next Tab reaches a sensible control near it.
  • After navigation or a client-side route change, check where focus goes and whether the new page or view is identifiable to keyboard and screen-reader users.
  • Confirm that Tab and Shift+Tab can move away from links. If a dialog intentionally contains focus, verify that users can close it and return to the triggering control.
  • If a link opens a new tab or window, make that behavior clear in the link's accessible name or nearby text; test how users return to the original page.

For links that change the URL without a full page load, do not assume browser navigation will handle focus as intended. Test the actual application: a route transition may need an explicit focus-management strategy.

A link navigates to a destination. A button performs an action, such as opening a menu, submitting a form, or dismissing a dialog.

<a href="/account">View account</a>
<button type="button" aria-expanded="false" aria-controls="account-menu">
  Open account menu
</button>

The button example shows the relationship to a menu; an implementation must also update aria-expanded and show or hide the referenced element as the state changes. ARIA attributes alone do not implement that behavior.

Misusing semantics affects more than appearance. Screen readers identify links and buttons differently and can provide ways to navigate by control type. Native controls also provide expected keyboard behavior. For example, an anchor used as a menu toggle may not respond to Space like a button, while a clickable <div> needs extra work to become focusable and operable. Prefer the native element for the job.

Test common page layouts

A skip link lets keyboard users bypass repeated navigation. Test it as the first focusable control where the page design provides one:

  1. Reload the page and press Tab. The skip link should become visible if it is normally offscreen.
  2. Press Enter and verify that the main content is brought into view.
  3. Press Tab again and check that focus continues from an appropriate point in the main content. Browser and application behavior can vary, so test the actual implementation.

This illustrative HTML and CSS uses a focusable main-content target:

<a class="skip-link" href="#main-content">Skip to main content</a>
<header>
  <nav aria-label="Primary">
    <a href="/">Home</a>
    <a href="/docs">Docs</a>
  </nav>
</header>
<main id="main-content" tabindex="-1">
  <h1>Documentation</h1>
  <a href="/docs/getting-started">Getting started</a>
</main>
.skip-link {
  position: absolute;
  left: -10000px;
  top: 1rem;
}

.skip-link:focus {
  left: 1rem;
  z-index: 1000;
  padding: 0.5rem;
  color: #000;
  background: #fff;
  outline: 3px solid #000;
}

tabindex="-1" permits programmatic focus without adding the main element to the normal Tab sequence. Test whether the fragment navigation produces the intended focus behavior in supported browsers; if it does not, the application may need to set focus explicitly. Also check that the revealed skip link is not covered by other content.

A different problem occurs when links inside a closed panel are merely moved offscreen or made transparent: they may remain keyboard-focusable. Hide the inactive panel in a way that also removes its controls from keyboard navigation, and restore access when it opens.

Advertisement

  • Reach the menu trigger with Tab and operate it as its control type requires. A button should work with Enter and Space.
  • Open the panel and tab through its links. Verify that each link has a visible focus indicator and activates with Enter.
  • Close the panel and confirm its links no longer appear in the Tab sequence.
  • If Escape is supported, check that it closes the panel and returns focus to a sensible place, normally the trigger when focus was inside the panel.
  • Test moving focus away from the open panel and returning to it. Check that the state remains understandable and controls are not stranded.

Ordinary site navigation can use a button that reveals a list of links; it does not automatically need an ARIA menu role. A component implemented as an ARIA menu has different keyboard interaction expectations, including arrow-key navigation. Test against the pattern actually used rather than assuming all navigation panels behave alike.

Focus order in columns and overlays

Compare the visual layout with the sequence reached by Tab. CSS can place a sidebar before the article visually while leaving it after the article in the document, or vice versa. The order need not match every visual detail, but it should preserve meaning and make the interface understandable. Repeat at narrow widths, where columns may stack differently.

When an overlay opens, check that focus moves appropriately and that hidden background controls do not receive focus through a modal dialog. On close, check that focus returns to the control that opened it, unless a different destination is more logical for the completed action.

Common Mistakes

  • Testing only with a mouse: a hover-revealed link can be impossible to discover by keyboard.
  • Checking only whether a link is focusable: a link also needs a visible indicator, a usable name, and working activation.
  • Using tabindex to repair a confusing layout: positive values can create a fragile focus order. Prefer a logical document order and native controls.
  • Hiding only visually: opacity or offscreen positioning alone can leave invisible controls in the Tab sequence.
  • Treating every keyboard issue as a link issue: a menu trigger may be a button, and the surrounding component may be responsible for focus management.
  • Calling a keyboard pass WCAG conformance: other requirements and additional evaluation methods still apply.

Best Practices

  • Audit components in both default and changed states, including error states and responsive layouts.
  • Use native anchors with href for navigation and native buttons for actions.
  • Preserve a conspicuous focus indicator and test it against the actual surfaces on which it appears.
  • Add regression checks for focus order and activation, but retain manual keyboard testing for visibility, context, and dynamic behavior.
  • Pair this checklist with screen-reader testing, including link names and announcements of dynamically changed content.

WCAG topics relevant to this audit include keyboard operation, avoiding keyboard traps, bypassing repeated blocks, focus order, focus visibility, and focus not being obscured. WAI guidance also covers keyboard patterns for interactive controls. Official WCAG and WAI pages could not be retrieved for this draft; consult the current guidance and the success criteria applicable to your project before making conformance claims.

Conclusion

A useful link audit follows the whole keyboard journey: reach a link, see it, activate it, and continue navigating. Repeat that journey in open menus, responsive layouts, and dynamically changed views, then document and retest each failure.

What would your domain sell for?

A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.