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

Invalid aria-checked attribute for radiobutton #853

Closed
bjarnef opened this issue Jul 17, 2024 · 1 comment · Fixed by #870
Closed

Invalid aria-checked attribute for radiobutton #853

bjarnef opened this issue Jul 17, 2024 · 1 comment · Fixed by #870
Labels
bug Something isn't working needs triage This issue has not been tested by a team member yet

Comments

@bjarnef
Copy link
Contributor

bjarnef commented Jul 17, 2024

Which exact UI Library version are you using? For example: 1.0.1 - don't just write v1.

1.8.2

Bug summary

The radiobutton component sets invalid value for aria-checked attribute compared to checkbox component:
https://uui.umbraco.com/?path=/story/uui-radio--radio-group

image

aria-checked attribute accept the following values:

true, false or mixed. Mixed value is only supported by checkbox and not radio though.

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-checked

Furthermore it mention in specs:

https://dequeuniversity.com/rules/axe/4.8/aria-allowed-attr?application=axeAPI
https://www.w3.org/TR/html-aria/#docconformance

aria-checked is not to be used on elements that support the checked attribute.

Specifics

No response

Steps to reproduce

Inspect radiobutton component and evaluate using WAVE

It is also rapported in Storybook under Accessibility when a radiobutton it selected/checked.

Expected result / actual result

No response

@bjarnef bjarnef added bug Something isn't working needs triage This issue has not been tested by a team member yet labels Jul 17, 2024
@bjarnef
Copy link
Contributor Author

bjarnef commented Jul 17, 2024

It was fixed in https://github.com/umbraco/Umbraco.UI/pull/625/files and at that time I tried making the checkbox/radiobutton a bit more consistent regarding the markup/styles.

Besides that I think there are some issues with tabindex as it requires double tab to focus the radiobutton. Especially in a radiogroup it is notable. There's another issue for that here: #619

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage This issue has not been tested by a team member yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant