Disallow labels associated with multiple controls (multiple-labeled-controls
)
<label>
can only be associated with a single control at once.
It should either wrap a single labelable control or use the for
attribute to reference the control.
Rule details
Examples of incorrect code for this rule:
<label>
<input type="text">
<input type="text">
</label>
<label for="bar">
<input type="text" id="foo">
</label>
<input type="text" id="bar">
Examples of correct code for this rule:
<label>
<input type="text">
</label>