Search input has accessible label; autocomplete uses ARIA live region
Why it matters
A search input without an associated label fails WCAG 2.2 SC 4.1.2 (Name, Role, Value) — screen readers announce the field as "edit text" with no context, making it unusable for blind users. Autocomplete dropdowns that don't use aria-live or role="listbox" are invisible to assistive technology: suggestions appear visually but are never announced, so keyboard and screen reader users cannot benefit from them. WCAG 2.2 SC 4.1.3 (Status Messages) further requires that dynamic content changes like suggestion updates be communicated without requiring focus movement.
Severity rationale
Medium because the failure eliminates search usability for screen reader users while stopping short of a critical data or security exposure.
Remediation
Label the search input explicitly and annotate the suggestions container with ARIA roles. In components/SearchInput.tsx:
<label htmlFor="search-input">Search listings</label>
<input
id="search-input"
type="text"
role="combobox"
aria-expanded={suggestions.length > 0}
aria-autocomplete="list"
aria-controls="suggestions-list"
/>
{suggestions.length > 0 && (
<ul
id="suggestions-list"
role="listbox"
aria-live="polite"
>
{suggestions.map((s, i) => (
<li key={i} role="option">{s.name}</li>
))}
</ul>
)}
aria-live="polite" causes screen readers to announce new suggestions without interrupting the user's current context. Test with VoiceOver (macOS) or NVDA (Windows) to verify announcements fire on each suggestion update.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Search & Discovery UX Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- wcag:2.2 · 1.3.1 — Info and Relationships
- wcag:2.2 · 4.1.3 — Status Messages
- wcag:2.2 · 4.1.2 — Name, Role, Value
Taxons
History
- 2026-04-18·v1.0.0·Initial import from directory-search-discovery·automated