accessible-autocomplete (GOV.UK Design System)
GOV.UK’s own accessible autocomplete component, maintained as a standalone tool and used across UK government services. Most of the page is npm-install and framework-integration instructions (Preact, React) — implementation detail, not design guidance; only the design rationale below is extracted.
License: Open Government Licence v3.0 — same basis as GOV.UK Design System.
Key points
- Framed as a tool for two goals at once: it helps a user choose from a list of known values faster than scanning an unfiltered
<select>, and it makes the answers a service collects more consistent — free-text entry for something like a country or organization name produces messy variants a constrained autocomplete avoids by construction. - Built explicitly to enhance a plain
<select>element rather than replace free-text entry — the “select-only” combobox variant in the W3C combobox pattern this component implements, not the free-text “editable” variant. - A dedicated country-and-territory variant exists as a separate, purpose-built component rather than a generic instance of the general autocomplete — evidence that a common, high-value autocomplete use case (selecting one of ~200 known countries) is worth its own tailored implementation rather than a one-size-fits-all configuration.