3 ms·
The standard explicitly allows a <label> to contain a single input element, http://www.w3.org/TR/html-markup/label.html http://www.w3.org/TR/html-markup/label.h
by codeka 14y ago
The standard explicitly allows a <label> to contain a single input element, http://www.w3.org/TR/html-markup/label.html http://www.w3.org/TR/html-markup/label.html:
The label element may contain at most one descendant input element,
button element, select element, or textarea element.
So it seems odd that it's considered invalid here. Of course, it's not unusual that the W3C is contradicting itself...
- nowarninglabel 14y agoIt's not invalid, it's a limitation of current assistive technology and how people use it. Eventually, AT will all be in line with standards, but until then, when agnostic about the choice, there's a good reason to go with one format over the other, considering that both formats are valid.