id must be unique

Rule ID Control 5
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 HTML5 and ARIA Techniques ruleset mapping
WCAG 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