Open
Description
openedon Sep 13, 2024
What problem does this address?
The component does two things:
- Wrap the buttons in a
role="group"
. - Add styling to make it look like a segmented control.
As we can see from the usages in the Gutenberg app, role="group"
is not semantically sufficient to make these buttons behave like a segmented control, and most consumers will not realize this. As such, most of our in-repo usages are inaccessible.
The outdated segmented control style is similar to the already deprecated RadioGroup, and is succeeded by the ToggleGroupControl style.
What is your proposed solution?
- Replace ButtonGroup usage with ToggleGroupControl #65339
- Soft deprecate the component. Fix: Add soft deperecation notice for the ButtonGroup component #65429
Consumers who want to wrap their buttons in a group
can do that with a plain <div role="group">
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes)./packages/components/packages/componentsIssues or PRs that relate to code qualityIssues or PRs that relate to code quality