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

[a11y]: Accessible Name for RadioButtons #17753

Closed
2 tasks done
srikant-ch5 opened this issue Oct 15, 2024 · 2 comments
Closed
2 tasks done

[a11y]: Accessible Name for RadioButtons #17753

srikant-ch5 opened this issue Oct 15, 2024 · 2 comments

Comments

@srikant-ch5
Copy link

Package

@carbon/react

Browser

Chrome

Operating System

MacOS

Package version

1.62.1

React version

18.3.0

Automated testing tool and ruleset

IBM Equal Accessibility Checker

Assistive technology

No response

Description

In some scenarios we don't want to show legend text in UI for associated Radiobuttons in such case there is an accessibility violation Group/Fieldset does not have an accessible name.

WCAG 2.1 Violation

No response

Reproduction/example

Run IBM Accessibility Checker on a RadioButtonGroup with no legendText.

Steps to reproduce

Open IBM Accessibility Checker Tool to Scan RadioButtonGroup with no legendText.

Image

Suggested Severity

None

Code of Conduct

@nkn2022
Copy link

nkn2022 commented Oct 30, 2024

Adding legendText on the RadioButtonGroup had fixed this issue for me. You can try that.
See example here: https://react.carbondesignsystem.com/?path=/docs/components-radiobutton--overview#overview

@guidari
Copy link
Contributor

guidari commented Nov 4, 2024

You can use the aria-label instead of the legendText. That way it will fix the a11y issue.

@guidari guidari closed this as completed Nov 4, 2024
@github-project-automation github-project-automation bot moved this from ⏱ Backlog to ✅ Done in Design System Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

5 participants