3 ms·
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 descenda
by talmand 10y ago
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.