- keyboard accessibility
- WCAG
- accessibility
- how-to
A 5-Minute Keyboard Accessibility Test Any Business Owner Can Do
Put your mouse away and test your own website with the Tab key. A simple five-minute keyboard check, what to look for, and how to fix what you find.
On this page
You don't need special software or technical skills to find some of the most important accessibility problems on your website. You need a keyboard and five minutes.
Many people don't use a mouse. Some have motor disabilities. Some are blind and use a screen reader with keyboard commands. WebAIM's keyboard accessibility guide notes that "many users with motor disabilities rely on a keyboard." The Justice Department lists mouse-only navigation as a common barrier in its web accessibility guidance.
If your menu, contact form, or checkout button only works with a mouse, those visitors can't use it. Here's how to check.
This is not legal advice. This test catches some common problems, not all of them. Passing it doesn't mean your site is compliant or protect you from a legal claim. If you have received a demand letter, talk to an attorney.
What the standards say
The Web Content Accessibility Guidelines (WCAG 2.1) include several keyboard requirements. The ones this test touches are:
- 2.1.1 Keyboard (Level A): "All functionality of the content is operable through a keyboard interface."
- 2.1.2 No Keyboard Trap (Level A): if you can move into something with the keyboard, you must be able to move back out.
- 2.4.1 Bypass Blocks (Level A): there should be a way to skip content repeated on every page, like a long menu.
- 2.4.3 Focus Order (Level A): the order you move through the page should make sense.
- 2.4.7 Focus Visible (Level AA): "Any keyboard operable user interface has a mode of operation where the keyboard focus indicator is visible."
You don't need to memorize these. The test below checks them in plain terms.
The keys you'll use
According to WebAIM:
- Tab moves forward to the next link, button, or form field
- Shift + Tab moves backward
- Enter activates a link (and buttons)
- Spacebar activates a button, or checks a checkbox
- Arrow keys move between options, such as radio buttons or items in a dropdown
- Esc should typically close a pop-up or menu
Tip: If pressing Tab doesn't seem to move between links at all, check your browser's keyboard settings or try a different browser before deciding the site is the problem.
The 5-minute test
Open your homepage. Click once in the browser's address bar, then put your mouse or trackpad out of reach. Now press Tab and work through these checks.
1. Can you see where you are? (about 1 minute)
Each time you press Tab, something on the page should be visibly highlighted, usually with an outline or underline. This is called the focus indicator.
Problem signs: You press Tab and nothing seems to change. Or the highlight is so faint you lose track of it.
WebAIM says a sighted keyboard user "must be provided with a visual indicator of the element that currently has keyboard focus."
2. Is there a "Skip to content" link? (a few seconds)
On your very first Tab press, look for a link that says something like "Skip to main content." It may appear only when it gets focus.
Problem sign: You have to press Tab many times to get through the menu before you reach the page content, on every page.
3. Does the order make sense? (about 1 minute)
Keep pressing Tab. The highlight should move in a logical order, usually left to right and top to bottom, following the layout of the page.
Problem signs: The highlight jumps from the header to the footer and back. It lands on things that are hidden. It skips important links.
4. Can you reach and use everything? (about 2 minutes)
Try every important task a customer would do:
- Open your main menu, including any dropdowns, and choose a page
- Reach and press your main call-to-action button ("Book now," "Call us," "Add to cart")
- Fill out your contact form and submit it
- Play and pause a video, if you have one
- Open and close a pop-up, like a newsletter sign-up or cookie banner
Problem signs: A menu opens only when you hover with a mouse. A button can't be reached with Tab. Pressing Enter on a "button" does nothing.
5. Can you always get out? (about 30 seconds)
Open any pop-up, chat widget, or embedded map, and try to leave it with Tab, Shift + Tab, or Esc.
Problem sign: You get stuck. The highlight keeps cycling inside one area and you can't move on. This is called a keyboard trap, and WebAIM notes that such traps "limit the user from being able to navigate to other interactive page elements."
Write down what you find
Keep it simple. For each problem, note:
- The page it was on
- What you were trying to do
- What happened (for example, "Couldn't open the Services dropdown with the keyboard")
Take a screenshot if it helps. This list is exactly what your web person needs, and it's a useful dated record if you ever need to show the steps you've taken.
Common fixes to pass along
Here are the usual causes behind each problem. Share these with whoever maintains your site.
No visible focus indicator
Often a stylesheet has removed the browser's default outline. WebAIM recommends avoiding outline:0 or outline:none or other styles that hide focus.
/* Before: focus is invisible */
a:focus, button:focus { outline: none; }
/* After: a clear, visible focus ring */
a:focus-visible, button:focus-visible {
outline: 3px solid #1a4fd6;
outline-offset: 2px;
}
Clickable things that aren't real buttons or links
A div or span with a click handler can't be reached with Tab by default. Use a real <button> or <a> element instead.
<!-- Before: mouse only -->
<div class="btn" onclick="openMenu()">Menu</div>
<!-- After: works with Tab, Enter and Space -->
<button type="button" onclick="openMenu()">Menu</button>
Menus that only open on hover
Dropdown menus should also open with the keyboard, for example when the menu button gets focus and the visitor presses Enter.
Pop-ups that trap focus or can't be closed
Every pop-up needs a close button reachable by keyboard, and Esc should close it. When it closes, focus should return to where the visitor was.
Confusing tab order
This usually happens when the order of elements in the code doesn't match what's on screen. The fix is to match the code order to the visual order, rather than forcing an order with positive tabindex values.
Third-party widgets
Booking tools, chat widgets and embedded forms come from other companies. If one fails this test, contact the vendor, look for an accessible setting, or offer a different way to complete the task, such as a phone number.
What this test can't tell you
This test is a great start, but it doesn't cover everything. It won't tell you whether a screen reader announces things correctly, whether your images have useful alt text, or whether your text has enough contrast. An automated scan covers some of those, and a manual review by an accessibility professional covers more.
For the other common issues, see The 10 Most Common Website Accessibility Problems (and How to Fix Them) and WCAG 2.1 AA Explained for Small Business Owners.
Pair your test with a scan
Your keyboard test checks how the site feels to use. A scan checks the code for problems that are hard to see by eye. Run a free scan of your homepage to get both halves of the picture.
If you're doing this because of a demand letter, start with Got an ADA Website Demand Letter? What Small Business Owners Should Do First. The Demand Letter Response Kit adds a full scan of up to 5 pages, a dated PDF report for your attorney, and a fix guide your web person can follow.