markusenglund / react-switch

A draggable toggle-switch component for React. Check out the demo at:
https://react-switch.netlify.com/
MIT License
1.33k stars 101 forks source link

Add aria-checked attribute. Fixes #58. #60

Closed monicahung closed 3 years ago

monicahung commented 4 years ago

The ARIA specification states that the aria-checked attribute needs to be specified if using the switch role.

https://www.w3.org/TR/wai-aria-1.2/#switch

markusenglund commented 3 years ago

Hi, sorry for the very late response.

Doing without aria-checked has worked fine with the screen readers I've tried but this couldn't hurt.

I'll merge this. It will be released in the upcoming 6.0.0 release.