Many people navigate websites without a mouse. Some have motor disabilities that make precise pointing difficult. Some use screen readers, which rely on keyboard commands. Others simply prefer the keyboard for speed, or use switch devices and voice control that work in similar ways. For all of them, two things decide whether a site is usable: whether they can see where they are, and whether they can reach everything in a sensible order.
How keyboard navigation works
On most websites, pressing the Tab key moves forward through interactive elements such as links, buttons and form fields. Shift and Tab moves backward. Enter activates links and buttons, the space bar toggles checkboxes and activates buttons, and arrow keys often move within menus, radio buttons and sliders. Escape commonly closes dialogs and menus.
The element that is currently selected is said to have focus. Whatever has focus will respond when the visitor presses Enter.
Make focus visible
Browsers show a default focus indicator, often an outline around the focused element. Some sites remove it because designers find it unattractive, leaving keyboard users with no idea where they are on the page. This is one of the most common and serious accessibility problems on the web.
The fix is not to remove focus styles but to design good ones. A clear, high-contrast outline or highlight that fits your brand works well. Modern CSS offers a focus-visible selector, which lets sites show focus styles to keyboard users while avoiding them on mouse clicks where browsers deem them unnecessary. The Web Content Accessibility Guidelines require focus to be visible, and WCAG 2.2 adds guidance about focus not being obscured by other content.
Keep the tab order logical
Focus should move through a page in an order that matches how it reads, usually top to bottom and left to right in English. Problems arise when:
- Layout is rearranged visually with CSS but not in the underlying HTML, so focus jumps around.
- Hidden elements, such as closed menus, still receive focus.
- Custom components are built from elements that cannot receive focus at all.
- Pop-ups open without moving focus into them, leaving keyboard users stuck behind.
Helpful additions
A skip link, often reading Skip to main content, lets keyboard users jump past a long header and navigation on every page. It can be visually hidden until it receives focus. Using proper HTML elements, real buttons for actions and real links for navigation, gives keyboard support for free, while custom clickable elements built from generic containers usually need extra work.
Test it in five minutes
Put your mouse aside and visit your homepage. Press Tab repeatedly and watch:
- Can you always see what has focus?
- Does focus move in a sensible order?
- Can you open and close the menu, submit the contact form and dismiss any pop-ups?
- Is there anywhere focus gets trapped or disappears?
Anything you cannot do with the keyboard, some of your visitors cannot do at all. Most of these issues are straightforward for a developer to fix once identified.
A Fuller Keyboard Test, Step by Step
The five-minute check is a great start. When you have a little more time, a fuller test covers the parts of a site that most often cause trouble.
- Check the skip link. Load a page and press Tab once. Does a skip link appear? Press Enter. Does focus move past the navigation into the main content?
- Test the navigation. Open any dropdown menus with the keyboard. Can you reach each item, and does Escape close the menu? On a mobile-sized window, can you open and close the menu button?
- Complete every form. Fill in each field, check boxes, choose options from dropdowns and submit. Then submit with errors and see whether focus moves to the error summary or first problem.
- Try interactive components. Accordions, tabs, sliders, carousels, image galleries and date pickers are common trouble spots. Each should work with the keyboard.
- Test overlays. Trigger any pop-ups, cookie banners or chat widgets. Confirm that focus moves into them, stays inside while they are open and returns to a sensible place after closing.
- Check embedded content. Maps, videos and booking widgets sometimes trap focus or cannot be skipped. Note any you cannot get past.
Common Problems and What They Usually Mean
- Focus disappears entirely. It may have moved into a hidden element, such as a closed menu or an off-screen panel. Hidden content should not receive focus.
- Focus jumps to the bottom of the page. The visual order may not match the order in the code, often because of layout changes made with CSS.
- A button does nothing when you press Enter. It may be a generic element styled to look like a button rather than a real button.
- You cannot leave a widget. Some embedded tools trap focus. These may need configuration changes or a different tool.
- The outline is there but barely visible. A thin, light outline on a light background does not provide enough contrast. A thicker, higher-contrast style helps.
Designing Focus Styles That Fit Your Brand
A focus style does not have to look like the browser default. Many brands design a focus indicator that matches their colors while remaining clearly visible:
- A solid outline in a brand color, offset slightly from the element so it does not touch the edges.
- A double ring, such as a light inner ring and a dark outer ring, which shows up on both light and dark backgrounds.
- A noticeable change in background color for buttons and menu items, combined with an outline.
Whatever you choose, apply it consistently across links, buttons and form fields, and check that it remains visible on every background color your site uses.
Questions Readers Ask
Is keyboard accessibility a legal requirement?
Accessibility requirements vary by location and type of organization. Many standards reference WCAG, which includes keyboard access. For your specific obligations, check with an attorney familiar with accessibility law.
Can an accessibility plugin fix keyboard issues automatically?
Plugins can sometimes help with specific things, like adding focus outlines, but they cannot reliably fix underlying problems in how components are built. Manual testing and code fixes remain important.
How often should I test?
After any significant change to your theme, menus or forms, and as part of a regular site review a few times a year.




