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):
Environment Information
Describe the issue:
Checkbox component should apply the
aria-role=switch
attribute automatically when thetoggle
prop is set to true.Actual behavior:
Even when the Checkbox is configured as a toggle, the
aria-role
attribute is being set ascheckbox
, which can cause accessibility issues when using screen readers.Expected behavior:
aria-role
should be defined asswitch
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