Selection
Chip
A small outlined pill that narrows a list, offers a related shortcut or holds a value someone typed: filter, assist and input chips.
In kanso-ui as Chip
Accessibility
- Filter: a
<button type="button">witharia-pressed; the set sits inrole="group"with a name, "Filter tasks". The check isaria-hidden;aria-pressedtells the state. - Assist: a
<button>named by its label. - Input: the chip is not a control, its remove button is, named after the value: "Remove Supplies". After a removal, move focus to the next remove button, or to the field when none is left.
- Tab reaches each button; Enter and Space press it.
- Targets: the 32px chip meets the web minimum and the 24px remove button the WCAG 2.2 AA minimum; neither reaches the 48px phone target.
- Contrast, light / dark:
inkonpaper16.7 / 15.9:1; theoutlineborder onpaper3.3 / 5.6:1 and onsurface3.5 / 5.1:1;on-inkonink16.7 / 15.9:1; the focus ring onpaper7.3 / 9.0:1. - Motion: only the state layer fades.