Use when
- Users know a word, name, or identifier.
- The result set can be meaningfully ranked or filtered.
Provide a labeled search field, run the query against relevant content, and show result count, matches, and recovery paths.
Users need to find matching content without browsing every category or page.
The full lab is intentionally loaded on request. That keeps this reading page fast while preserving the strong and weak states, keyboard checks, and failure scenarios.
The content set is larger than users can comfortably scan.
Provide a labeled search field, run the query against relevant content, and show result count, matches, and recovery paths.
Empty query state.
Searching the wrong scope without telling users.
The input has a stable accessible name.
Ministry of Justice - checked
MOJ search guidance supports a labeled search field, submit action, hints, and no-results recovery for search tasks.
W3C Web Accessibility Initiative - checked
APG landmark guidance supports exposing search as a named search region.
Government Digital Service - checked
GOV.UK patterns emphasize task-oriented search, filtering, and recovery states.
Source trail checked: