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

Nesting inputs inside of the label is accepted practice. The w3c wiki site even provides an example.

w3.org: The label element may contain at most one descendant input element, button element, select element, or textarea element.

You just have to be a bit careful with it concerning screen readers.

EDIT: besides, there are CSS reasons for wrapping the input with a label.



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

Search: