User Impact: Critical
Disabilities Affected:
WCAG Version:
2
WCAG Levels:
WCAG Guidelines:
Solution Techniques:
Automated Test Accuracy:
High
Check1st Severity:
4
DRRSAG Designations:
Use the desired element’s id
attribute value for the label’s for
attribute.
The engine scans label elements that have for
attributes, and checks whether the value corresponds to the id
attributes of existing elements.
When label elements are properly associated with their respective input elements, the label is spoken by screen readers when the form field receives focus. In addition, users with impaired motor control have a larger clickable area for the control to activate it.
<label for="name">Name</label>
<input type="text" name="name" id="name"/>