Inputs
Search field
A search field is the pill a person types into to find payments, tasks and events; put it at the top of anything that can be searched.
In kanso-ui as SearchField
Accessibility
- Name:
aria-labelon the input, since the pill has no visible label. The placeholder vanishes at the first keystroke and is not a dependable name, so thearia-labelrepeats its words, "Search payments, tasks, events", and voice-control users can say what they see. - Role:
type="search"gives the searchbox role;enterkeyhint="search"puts a Search key on phone keyboards. Wrap the pill in<search>when it searches the page. - Keyboard: Tab reaches the field, then Clear search; Enter submits; Escape clears.
- Results that update while the person types: announce the count ("3 results") from the results list, with a polite live region.
- Targets: the input fills the pill's 44px height, so the whole row takes a tap; Clear search is 32px.
- Contrast (light, dark): value
inkonsurface-sunken15.3 and 12.8:1; placeholder and iconink-mutedonsurface-sunken5.9 and 7.2:1; focus ring onpaper7.3 and 9.0:1. The fill is a soft recess, not a 3:1 boundary: the icon and the placeholder mark the field. - Motion: none.