- Docs
- Components
- Data display
Chip
An interactive tag: one that turns on and off, such as a filter, or a choice already made with a button that removes it.
- Import
- @qeetrix/react/experimental
- Status
- ExperimentalSince 0.4.0
- Renders
<span role="checkbox">Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Keyboard
| Keys | What happens |
|---|---|
| TabTab | To each chip on its own; into a one-value group once, at its choice. |
| Space | Turns the focused chip on or off. |
| ←→ | In a one-value group, moves the choice; ↑ and ↓ too. Mirrored in right to left. |
| EnterSpace | On a remove button, removes its chip. |
02
Behaviour
- Role and name
- A selectable chip is a checkbox (a radio in a one-value group), named by its label; the group is named by label.
- Chosen
- A check, or the 2px edge where there's an icon, as well as the tint: never colour alone.
- Remove
- A button named "Remove Status: Active", "{label} हटाएँ" in Hindi.
- Forced colours
- Each chip is edged in ButtonText; a chosen one is drawn in Highlight.
03
Tested
On every change, before it ships.
- axe, WCAG 2.2 A and AA, in light and dark, in Chromium on every pull request
- Firefox and WebKit every night
- Screenshots in both schemes at every density
- Right to left: the arrow keys mirror