ol and ul role grouping semantics

Definition ol and ul elements must only have grouping role values of directory, group, listbox, menu, menubar, presentation, radiogroup, tablist, toolbar or tree.
Purpose
  • The ol and ul elements have role restrictions as part of their definition in the W3C HTML5 Specification.
  • When ol and ul elements only need to use the role attribute when they are part of interactive widgets and are restricted to widget grouping roles.
  • The role values used identify grouping widget roles to ensure that their native grouping semantics are not inadvertently overridden by non-grouping widget or landmark roles.
Required No for HTML4 Legacy Techniques ruleset mapping
WCAG 2.0 Success Criteria

4.1.2 Name, Role, Value (Level A, Primary Success Criterion)

Rule Category Styling/Content
Scope Element
Target Resources ol and ul elements
Techniques
  • Do not use the role attribute if the default semantics of ol or ul represent a container of a non-interactive list.
  • The ol and ul elements when used as part of widgets must be used to indicate the grouping of a list of related widget roles.
  • Allowed role values include: directory, group, listbox, menu, menubar, presentation, radiogroup, tablist, toolbar or tree.
  • In rare cases role="presentation" is allowed on a ol and ul element when the element is not being used to represent a group of related items in a list.
Informational Links