microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.52k stars 2.73k forks source link

Checkbox component using wrong aria-label when it is used as a toggle #24612

Closed gabriel-cantergiani closed 1 year ago

gabriel-cantergiani commented 2 years ago

Environment Information

Describe the issue:

Checkbox component should apply the aria-role=switch attribute automatically when the toggle prop is set to true.

Actual behavior:

Even when the Checkbox is configured as a toggle, the aria-role attribute is being set as checkbox, which can cause accessibility issues when using screen readers.

Expected behavior:

aria-role should be defined as switch if the Checkbox is configured as a toggle.

Priorities and help requested (not applicable if asking question):

Are you willing to submit a PR to fix? Yes

Requested priority: Normal

msft-fluent-ui-bot commented 1 year ago

Because this issue has not had activity for over 180 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.