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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Joy-ui Radio element is missing a corresponding 'radio' role #40240

Closed
2 tasks done
benh-dug opened this issue Dec 19, 2023 · 2 comments
Closed
2 tasks done

The Joy-ui Radio element is missing a corresponding 'radio' role #40240

benh-dug opened this issue Dec 19, 2023 · 2 comments
Labels
package: joy-ui Specific to @mui/joy

Comments

@benh-dug
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 馃暪

https://github.com/mui/material-ui/blob/master/packages/mui-joy/src/Radio/Radio.tsx#L277C5-L277C5
https://github.com/mui/material-ui/blob/master/packages/mui-joy/src/RadioGroup/RadioGroup.tsx#L88

Current behavior 馃槸

The current behaviour does not specify a default role for the radio component, but does for the radiogroup.

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/radiogroup_role

Expected behavior 馃

A default role of 'radio' should be specified for radio.

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/radio_role

Context 馃敠

I'm unable to use '@testing-library/react' to search for the specific radio buttons via role to confirm if they are checked in a consistent manner.

Your environment 馃寧

No response

@benh-dug benh-dug added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 19, 2023
@benh-dug
Copy link
Author

As a temporary workaround I am manually specifying the role on the radio elements, but it would be better to have this fixed at the library level.

@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 19, 2023
@benh-dug
Copy link
Author

After digging a bit further, it looks like the role can be inferred by the combination of an input with the 'radio' type

https://www.w3.org/TR/html-aria/#docconformance

@zannager zannager added the package: joy-ui Specific to @mui/joy label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: joy-ui Specific to @mui/joy
Projects
None yet
Development

No branches or pull requests

2 participants