DEV Community

Discussion on: Create a custom toggle component in Vue.js. 🎛

Collapse
binotaliu profile image
ビノタ

As another comment said that it is not a11y friendly. I strongly recommend to use input[type=checkbox] and use css to style it. Or, you can put an input[type=checkbox] that only visible to screen readers, then hide your divs on screen readers.

Collapse
vaibhavkhulbe profile image
Vaibhav Khulbe Author

Thanks for the info!