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

ToggleGroupControlOption: aria-label cannot be overwritten #35381

Closed
Tracked by #34345
mirka opened this issue Oct 6, 2021 · 0 comments · Fixed by #35423
Closed
Tracked by #34345

ToggleGroupControlOption: aria-label cannot be overwritten #35381

mirka opened this issue Oct 6, 2021 · 0 comments · Fixed by #35423
Assignees
Labels
[Feature] Component System WordPress component system [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress

Comments

@mirka
Copy link
Member

mirka commented Oct 6, 2021

Description

It would be better if we could override the aria-label when the visual label is non-ideal for screen readers:

<Radio
{ ...props }
as="button"
aria-label={ label }

The aria-label currently defaults to the visual label, which is possibly also redundant because the same label appears as a child element.

Step-by-step reproduction instructions

For example:

<ToggleGroupControlOption
	key={ value }
  label="A→Z"
  aria-label="Ascending"
  value={ value }
/>

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@mirka mirka added [Package] Components /packages/components [a11y] Labelling [Feature] Component System WordPress component system Good First Issue An issue that's suitable for someone looking to contribute for the first time labels Oct 6, 2021
@mirka mirka removed the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Oct 7, 2021
@mirka mirka self-assigned this Oct 7, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 7, 2021
@priethor priethor added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). and removed [a11y] Labelling labels Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Component System WordPress component system [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants