Closed martalalik closed 1 year ago
Meeting 29.09
Variants:
Implementation checklist:
<button>
element, no links, with aria-pressed
.🤔
ToggleButton
based on Button
with internal aria-pressed
?
ToggleButtonGroup
based on ButtonGroup
wrapper?Released in eds-core-react@0.22.0!
Goals
Create ToggleButtonGroup.Research
Requirements
Variants:
Exclusive selection - With exclusive selection, selecting one option deselects any other. Exclusive selection does not enforce that a button must be active.
Multiple selection - Multiple selection allows for logically-grouped options, to have multiple options selected.
Vertical buttons.
Enforce value set - If you want to enforce that at least one button must be active.
Custom - customise the component.
With
Menu
In
TopBar
.Text only.
Icon only.
Text & icon.
Accessibility:
aria-label="label"
,aria-labelledby="id"
or<label>
. ToggleButton setsaria-pressed="<bool>"
according to the button state.You should label each button with aria-label.Practice:
Additional info: