Provide list labels when appropriate

Rule ID List 2
Definition When appropriate, a list container element (ul, ol, dl, [role="list"], [role="group"]) must include a label that describes the purpose or contents of the list.
Purpose
  • Assistive technologies use labels on ul, ol and dl elements, and elements with [role="list"] and [role="group"] attributes to help screen reader users understand the purpose or contents of lists.
Required No for HTML4 Legacy Techniques ruleset mapping
WCAG Success Criteria

2.4.6 Headings and Labels (Level AA, Primary Success Criterion)

Rule Category Styling/Content
Scope Element
Target Resources ul, ol and dl elements, container elements with [role="list"], [role="group"]
Techniques
  • Use the aria-labelledby attribute to add a label to a list container element to reference the id(s) of one or more elements on the page that describe its contents.
  • Use the aria-label attribute to add a label to a list container element to provide an explicit text description of its contents.
  • The title attribute can also be used to add a label to a list container element to provide an explicit text description of its contents.
Informational Links