Form
Search input
Published on
Description
The search input provides a text field optimized for search queries. It uses type="search" which provides a clear button and search-specific keyboard behavior on mobile devices.
Example
Accessibility
- Wrap in a
<search>landmark or userole="search"on the form. - Use explicit
<label for="id">association. - Inherit typography for WCAG 1.4.12 compliance.
- Ensure the clear button is keyboard accessible.
References
- Under-Engineered Text Boxen (opens in new tab) — Adrian Roselli
- Under-Engineered Search Results (opens in new tab) — Adrian Roselli
Related
- Text input — for general text
Variables
None for input