Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate ButtonGroup component #65338

Open
2 tasks
mirka opened this issue Sep 13, 2024 · 1 comment
Open
2 tasks

Deprecate ButtonGroup component #65338

mirka opened this issue Sep 13, 2024 · 1 comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality

Comments

@mirka
Copy link
Member

mirka commented Sep 13, 2024

What problem does this address?

The component does two things:

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?

Consumers who want to wrap their buttons in a group can do that with a plain <div role="group">.

@mirka mirka added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Sep 13, 2024
@hbhalodia
Copy link
Contributor

Hi @mirka, I have raised the PR by adding the soft deprecation as expected on the issue. Let me know if we need to update anything else in the PR - #65429

Thank You,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

No branches or pull requests

2 participants