Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you have a checkbox with a label, please a "for" attribute to the label so I can disable/enable the checkbox by clicking the label. This is one of my biggest pet peeves, maybe its just me.


Wrapping input into a label also works. Not sure why people tend to separate the two.

And also why browsers started separting these. It’s a checkbox and radio that should contain a text, not vice versa.


One reason I have heard about is implicit labelling doesn't work with all voice control tech, including macOS voice control[1]

[1] https://a11ysupport.io/tests/html_label_element_implicit


Not just you it's a required feature of accessible sites following ADA/WCAG.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: