input-requires-label
All <input> tags must have a corresponding <label> tag.
Level: Warning
Config value
Section titled “Config value”true: enable rulefalse: disable rule
The following patterns are not considered rule violations
Section titled “The following patterns are not considered rule violations”<input type="password"><input id="some-id" type="password" /> <label for="some-other-id"/><input id="some-id" type="password" /> <label for=""/><input type="password" /> <label for="something"/>The following patterns are considered rule violations
Section titled “The following patterns are considered rule violations”<label for="some-id"/><input id="some-id" type="password" /><input id="some-id" type="password" /> <label for="some-id"/>Why this rule is important
Section titled “Why this rule is important”This rule ensures that the input element has a corresponding label element for accessibility compliance.