OpenA11y Evaluation Library

label must reference control

Rule ID Control 6
Conformance Required
Definition Each label element using the for attribute must reference a form control on the page.
Purpose
  • label[for] elements are useful for accessibility only when they reference form controls.
  • Use only one label[for] element per control, using more than one label[for] element per control is not supported consistently between browsers.
  • The use of labels increase the effective size for activation of the control and provide a speak-able label for speech input activation.
Conformance Required
WCAG Success Criteria

Success Criterion 3.3.2 Labels or Instructions

Rule Category Forms
Rule Scope Element
First Step no
aXe Rules
Wave Rules
Techniques
  • For a label[for] element to properly reference a form control, ensure that the for attribute value on the label element exactly matches the id attribute value on the form control.
  • Define only one label[for] element per form control.
Information Links