Skip to main content
Cautionary Tale5 min read

Your Website Traps Keyboard Users and Nobody Noticed

By The bee2.io Engineering Team at bee2.io LLC

Your website is basically a beautiful nightclub where half your guests have to navigate by touch because you forgot to install any lights. And the really fun part? They're too polite to complain.

About 1 in 20 people rely primarily on keyboard navigation to browse the web - that's roughly 5% of your audience you're potentially frustrating into submission. They're not doing this for fun. They're doing it because they have motor disabilities, repetitive strain injuries, or they just think your mouse pad is a conspiracy. Regardless, they deserve to actually use your site. Instead, many websites have accidentally created the digital equivalent of a one-way door with no handle on the inside.

Let's talk about what's actually happening on your site, and why your keyboard users are currently having a worse time than someone trying to assemble IKEA furniture with oven mitts on.

The Vanishing Focus Styles Mystery (AKA: Keyboard Users Playing Invisible Maze)

Here's a crime we see constantly: developers remove focus styles - those helpful little outlines and highlights that show keyboard users where they are on a page - and replace them with absolutely nothing. It's like removing all the street signs from a city and assuming people will just figure it out by vibes.

Focus styles are the only way keyboard users know where they are. Without them, pressing Tab becomes an existential crisis. They're tabbing through your form fields, but nothing changes visually, so they have no idea if they've landed on a button, a text input, or your company's aggressive autoplay video. (Please delete that, by the way.)

The worst part? This is usually accidental. Some designer adds this super cool style reset that nukes the default focus outline, and nobody remembers to replace it with something custom. Now your site works fine for mouse users and is basically unnavigable for everyone else. It's the web development equivalent of having a beautiful storefront with a locked door.

The fix is embarrassingly simple: Add visible focus styles to every interactive element. Use outline, box-shadow, or whatever fits your design. Just make them visible. Contrast matters too - aim for at least 3:1 contrast ratio between the focused element and the background.

Modal Keyboard Traps (Or: How to Lock Users in Your Dialog Box Dungeon)

Modals are where keyboard navigation goes to die. A modal is supposed to trap focus inside itself - that's actually good, important behavior. Users shouldn't be able to tab behind the modal and interact with content they can't see. That would be chaos.

But here's where it gets weird: a lot of modals are actually trapping focus with no escape hatch. There's no close button, no functional way out, and definitely no keyboard-accessible dismiss button. The user's stuck there, tabbing in circles like a lab rat, while your JavaScript silently judges them.

The classic mistake is making the close button visual-only - maybe it's just an X icon with no actual semantic button element. Or the close button is there but totally inaccessible to keyboard users because it only responds to click events and has no tabindex. Your keyboard user is now trapped in your popup like it's a consent cookie that learned to dream.

The real problem: Modals need an escape plan. Specifically, they need Tab focus to loop back to the first focusable element when users reach the last one. They need keyboard-accessible close buttons. They should usually respond to the Escape key. These aren't luxury features - they're basic survival tools.

Broken Tab Order (The Chaos Gremlin Scenario)

Imagine walking through a building where doors lead in random directions. You open Door 1 and somehow you're in the kitchen. Door 2 drops you in the attic. Nobody planned this. Your HTML just got reorganized with CSS Grid, and now the visual tab order looks nothing like the logical tab order. It's a disaster.

Tab order should follow the visual flow of the page - left to right, top to bottom, like reading. When it doesn't, keyboard users experience the most annoying form of teleportation. They tab from a form field at the top right, and suddenly they're focused on something in the bottom left. No warning. No sense-making. Just vibes.

This usually happens because:

  • CSS Grid or Flexbox reordered visual elements but nobody updated the HTML
  • Someone got tab-index-happy and assigned weird numbers like 1, 15, 3, 2 instead of letting the natural DOM order flow
  • Focus management JavaScript exists but was written by someone from 2014 and uses deprecated methods

The solution: Keep your HTML in a logical order that matches the visual experience. If you need to rearrange visually, use CSS. Avoid custom tabindex values when possible - zero and -1 are your friends. Negative tabindex hides things from tab navigation (useful for modals), and zero uses the natural DOM order.

Actually Fix This Today

Keyboard accessibility isn't some future nice-to-have feature. It's foundational. Your keyboard users are trying to use your site right now, probably frustrated, probably just leaving for a competitor's site that doesn't hate them.

Pull up your own website and try navigating with only your keyboard for five minutes. No mouse. No trackpad. Just Tab, Shift-Tab, and Enter. See how long you last before you either succeed or rage-quit. If you rage-quit, you found your problems.

Use a tool like SCOUTb2 to scan your site and catch focus issues automatically. Fix your focus styles, make sure your modals have escape routes, and verify your tab order makes sense. Your keyboard users will appreciate it, and honestly, the rest of your users benefit from better-organized, more intentional navigation too.

Be the website that didn't forget about 5% of its audience. Be the hero of this story.

Disclaimer: This article is for informational purposes only and does not constitute legal, professional, or compliance advice. SCOUTb2 is an automated scanning tool that helps identify common issues but does not guarantee full compliance with any standard or regulation.

accessibilitykeyboard navigationfocus trapWCAG

Stop finding issues manually

SCOUTb2 scans your entire site for accessibility, performance, and SEO problems automatically.