Range filters use accessible input widgets (not freeform text)
Why it matters
Range filters rendered as freeform text inputs (<input type="text">) violate WCAG 2.2 SC 1.3.5 (Identify Input Purpose) and SC 4.1.2 (Name, Role, Value) — screen readers cannot convey the expected value type, and users relying on step controls or browser autofill get nothing. Beyond accessibility, freeform text introduces validation surface area: users enter "10-50", "$10 to $50", or "ten dollars" and the backend must parse all variants or return unexpected results. Semantic number or range inputs constrain input to a machine-readable format without custom parsing.
Severity rationale
Low because the failure degrades usability and assistive technology access without directly exposing data or enabling exploitation.
Remediation
Replace freeform text range inputs with paired <input type="number"> elements, each carrying an explicit label and aria-label. In components/PriceFilter.tsx:
<label htmlFor="price-min">Minimum price</label>
<input
id="price-min"
type="number"
value={min}
onChange={e => setMin(e.target.value)}
aria-label="Minimum price"
/>
<label htmlFor="price-max">Maximum price</label>
<input
id="price-max"
type="number"
value={max}
onChange={e => setMax(e.target.value)}
aria-label="Maximum price"
/>
Alternatively, use shadcn/ui's Slider component, which ships with full ARIA support out of the box.
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.5 — Identify Input Purpose
- wcag:2.2 · 4.1.2 — Name, Role, Value
Taxons
History
- 2026-04-18·v1.0.0·Initial import from directory-search-discovery·automated