Accessible Search: The Box Half Your Users Can't Use
Search is the feature people reach for when your navigation has already failed them, so an inaccessible search box fails people twice.
Search boxes have a special property that most features on a site don’t: they’re used disproportionately by people who are already lost. When your navigation works for someone, they click through it. When it doesn’t, when the categories don’t match how they think, when the menu is too deep, when they can’t see or operate it, they go looking for the search box. Search is the escape hatch. Which means that when search itself is inaccessible, you’re not failing a random slice of users. You’re failing the same people your site already failed once, at the exact moment they were trying to recover.
The failures start before anyone types a character. The modern fashion is to represent search as a bare magnifying-glass icon that expands into a field when clicked. Visually this is tidy. Underneath, it’s often a div with a click handler, and a div is not a button. Keyboard users tab straight past it because unfocusable elements don’t exist to the keyboard. Screen reader users hear, at best, “image,” with no name, because nobody gave the icon an accessible label. The fix is old, boring HTML: a real button element, with text or an aria-label that says “Search,” wrapping the icon. The browser then does everything else for free, focus, keyboard activation, announcement. Almost every accessibility problem with search controls comes from rebuilding, in JavaScript, things the browser already knew how to do.
Then comes the field itself, and the placeholder problem. The word “Search” written as gray placeholder text inside the box is not a label; it disappears on focus and on typing, it’s usually too low-contrast to pass any reading test, and it’s the only identification the field has. An input with a proper label, even one visually hidden but present for assistive technology, tells everyone what the box is. And the input should say what it is in another sense too: HTML has a search input type and a role for search regions, which let screen reader users jump directly to search from anywhere on the page. People who rely on that landmark navigate sites by asking “where’s the search?” and jumping there. A search box that isn’t marked as one is a door with no handle.
The hardest part is what happens while you type. Live suggestion dropdowns, the autocomplete lists that appear under the field, are among the most difficult widgets on the web to get right. Done properly, the field announces that suggestions exist, arrow keys move through them, the current suggestion is read aloud, Enter selects, Escape dismisses. Done the usual way, suggestions appear silently as a visual list that keyboard focus can’t enter, so a blind user types, hears nothing, and doesn’t know that the answer to their question appeared and vanished four inches below their cursor. Meanwhile the suggestions intercept the arrow keys, so a sighted keyboard user who just wants to move the text cursor within their query finds the widget fighting them. If you can’t build the full pattern correctly, a plain field that submits on Enter to a results page is not an embarrassment. It’s the honest version, and it works for everyone.
The results page has its own silent failure. On many sites results load dynamically into the page without a reload, and nothing announces that this happened. The screen reader user presses Enter and hears silence. Did the search run? Did it find nothing? They’re left to wander the page hunting for evidence. The mechanism for fixing this, a live region that announces “14 results for blue jacket,” is a few lines of markup. And that announcement text is worth writing for everyone, because the zero-results case is where sighted users get abandoned too: a blank area, or the word “Nothing found” in small gray type, with no suggestion of what to try instead. A search that found nothing should say so loudly and offer a next move.
What I find interesting about all this is the economics. Companies pay real money for search: for the engine, the indexing, the relevance tuning, sometimes an entire vendor relationship. Then the box that fronts all of it fails at the level of missing labels and fake buttons, problems that cost nothing to fix and everything to have. It’s like installing an elevator and forgetting the call button. When GazeSite scans a page, the search control is one of the spots where this pattern shows up most reliably, expensive machinery behind an interface that a keyboard can’t operate.
The test costs you five minutes. Load your site, put your hands on the keyboard only, and search for something. Can you reach the box? Can you tell it’s the box? Can you get past the suggestions, submit, and tell what came back? Then do it once more with your eyes closed, using a screen reader, and listen to what your site actually says. For a lot of sites the answer is nothing at all. The lost users reached for the escape hatch, and it was painted on.
More articles
Hesitant buyers are usually stuck on downside risk, and a specific, honest guarantee removes that risk more cheaply than any amount of persuasion.
Read →Visitors arrive with questions they never type, and a landing page succeeds or fails by whether it answers them in order.
Read →On a phone, the paragraph break is a unit of design, and dense blocks of text get skipped before they get read.
Read →