3 ms·
I believe using a checkbox element and the :checked selector alongside siblings matching would do the trick.
by jgtrosh 8y ago
I believe using a checkbox element and the :checked selector alongside siblings matching would do the trick.
- Tade0 8y agoThat would do nothing for screen readers thus compromising accessibility.
- giancarlostoro 8y agoI've done / seen so many hacky things in web dev I would be surprised how many websites even work properly with screen readers.
- Tade0 8y agoSuch is the sad state of web development.
- giancarlostoro 8y agoAs I do hacky work on the web I sometimes wonder why specific UI elements don't exist yet instead of people being forced to hack other elements to do things the web doesn't support. I can't remember a good example off the top of my head currently sadly.
- extra88 8y agoIf you use the checked state to of a checkbox to change the display property (i.e. toggle between none and initial), that will change the content's visibility and its availability to screen readers.