id must be unique

Definition All id attribute values must be unique on the page.
Purpose
  • id attribute values on form control elements can be used as references by label elements. When id attribute values on the page are not unique, form controls may be incorrectly labelled.
  • aria-labelledby and aria-describedby atributes also depend on unique id values for labeling and adding descriptions to form controls.
Required Yes for HTML4 Legacy Techniques ruleset mapping
WCAG 2.0 Success Criteria

4.1.1 Parsing (Level A, Primary Success Criterion)

Rule Category Forms
Scope Element
Target Resources Form control elements with id attributes
  • select
  • textarea
Techniques
  • If a form control defines an id attribute, ensure that its value is unique on the page.
Informational Links