We're a place where coders share, stay up-to-date and grow their careers.
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.
input[type=checkbox]
div
Thanks for the info!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
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 aninput[type=checkbox]
that only visible to screen readers, then hide yourdiv
s on screen readers.Thanks for the info!