Query suggestions
Suggestions while typing can save time, or pull people toward something they did not mean.
The answer
Put the most likely suggestions first, and keep what people typed in the field. As strong as the weakest rule behind it: moderate.
-
Put the most likely suggestions first.
Logs of about 1.6 million queries from one search engine and a second engine's logs both show selections concentrated in the first two positions. A 25-person eye-tracking study found reordering changed behavior little, which is why this is 3 and not 4.
- Applies when
- Suggestions are shown.
- Based on
- Research
- Principle
- Let practiced people go faster
- ReviewReview: A Survey of Query Auto Completion in Information RetrievalFei Cai, 2016
- ExperimentExperiment: An Eye-tracking Study of User Interactions with Query Auto CompletionKatja Hofmann, 2014
- Field dataField data: On User Interactions with Query Auto-CompletionBhaskar Mitra, 2014
- Field data: A Two-Dimensional Click Model for Query Auto-CompletionYanen Li, 2014
-
Keep what people typed. Arrows move through suggestions, Escape closes the list, and Enter searches for what’s in the box.
The ARIA practices guide and Baymard. Rated 3.
- Applies when
- Suggestions are shown.
- Based on
- Convention
- Principle
- Keep people in control
- Common mistake
- Suggestions that replace what the person typed with no way back (rule 3).
- User researchUser research: Autocomplete Design (e-commerce search suggestions)Baymard Institute, 2022
- User research: Always Copy the Active Autocomplete Suggestion to the Search FieldBaymard Institute, 2024
- LawLaw: Combobox pattern, ARIA Authoring Practices GuideW3C WAI
The other rules
-
Make the suggestion list work from the keyboard, and tell screen readers when it’s open and which item is active.
WCAG 2.2 level A. Both reopened and checked.
- Applies when
- Suggestions are shown.
- Based on
- Standard or law
- Principle
- Work for everyone
- StandardsStandard: Understanding SC 2.1.1 Keyboard (Level A)W3C WAI
- Standard: Understanding SC 4.1.2 Name, Role, ValueW3C WAI, 2026
- LawLaw: Combobox pattern, ARIA Authoring Practices GuideW3C WAI
-
Completing the top suggestion inline in the box makes people accept suggestions more often.
One retailer's own online experiment over 140 million sessions found more acceptance and less typing, with almost no effect on sales. One company, so 3.
- Applies when
- Suggestions are shown.
- Based on
- Research
- Principle
- Let practiced people go faster
- ExperimentExperiment: Ghosting: Contextualized Query Auto-Completion on Amazon SearchAmazon Science, 2019
-
Tell screen readers how many suggestions there are when the list changes.
A government team's test with four assistive-technology users, and the ARIA guide. Rated 2.
- Applies when
- Suggestions are shown.
- Based on
- Practitioner research
- Principle
- Work for everyone
- LawLaw: Combobox pattern, ARIA Authoring Practices GuideW3C WAI
- GuidanceGuidance: What we learned from getting our autocomplete tested for accessibilityGOV.UK accessibility team, 2018
-
Show a short list of suggestions that fits without scrolling.
The only experiments on list length are a 30-person study on keypad phones and one with four items; practitioner limits come without samples. Rated 1.
- Applies when
- Suggestions are shown.
- Based on
- Research
- Principle
- Leave out what is not needed
- ExperimentExperiment: Query Suggestions for Mobile Search: Understanding Usage PatternsMaryam Kamvar, 2008
- Field dataField data: On User Interactions with Query Auto-CompletionBhaskar Mitra, 2014
- User researchUser research: Autocomplete Design (e-commerce search suggestions)Baymard Institute, 2022
- User research: Design Site Search Suggestions for Better ResultsKate Moran, 2018
Accessibility
Open questions
- OpenList length (rule 6).
- OpenWhether suggestions improve the queries people end up with: no study read measures it; one found fewer keystrokes but no time saved.
Sources
- ReviewReview: A Survey of Query Auto Completion in Information RetrievalFei Cai, 2016
- ExperimentsExperiment: An Eye-tracking Study of User Interactions with Query Auto CompletionKatja Hofmann, 2014
- Experiment: Ghosting: Contextualized Query Auto-Completion on Amazon SearchAmazon Science, 2019
- Experiment: Query Suggestions for Mobile Search: Understanding Usage PatternsMaryam Kamvar, 2008
- Field dataField data: On User Interactions with Query Auto-CompletionBhaskar Mitra, 2014
- Field data: A Two-Dimensional Click Model for Query Auto-CompletionYanen Li, 2014
- User researchUser research: Autocomplete Design (e-commerce search suggestions)Baymard Institute, 2022
- User research: Always Copy the Active Autocomplete Suggestion to the Search FieldBaymard Institute, 2024
- User research: Design Site Search Suggestions for Better ResultsKate Moran, 2018
- StandardsStandard: Understanding SC 2.1.1 Keyboard (Level A)W3C WAI
- Standard: Understanding SC 4.1.2 Name, Role, ValueW3C WAI, 2026
- LawLaw: Combobox pattern, ARIA Authoring Practices GuideW3C WAI
- GuidanceGuidance: What we learned from getting our autocomplete tested for accessibilityGOV.UK accessibility team, 2018
Related
- The search fieldShow an open search field, keep the query in it on the results page, and search the whole site.Answer: weak.
- Selects vs radios vs comboboxesShow a few options as radio buttons. For a long list, let people type.Answer: moderate.
- Announcements to screen readersAnnounce results, errors and progress without moving focus, politely, and only what people need.Answer: moderate.