Page Title: CSS-Position - Relativ - Absolut - Flexibel
May 20, 2018 05:23

ol and ul role grouping semantics

Actions

Severity Action
no actions

Details

Rule ID Role 3
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.
WCAG 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

Element Results

Element Identifier Result Element Position Message

Column Definitions

Element Identifier
Information about the element associated with the result.
The information typically includes the tag name, accessible name or other information related to the rule requirements.
"Page" means that the result applied to the page. For example, the rule "One main landmark on the page" is a page level rule.
Element Position
The element position is based on the DOM order of elements in the page.
The element position maybe useful in helping to locate a specific element on the page evaluated (e.g smaller numbers are typically toward the beginning of a page and larger numbers typically toward the end of a page).
Element position 1 is the first element.
The highest element position is the last element.
Element position values for most rule/page results will not be consecutive since a rule only applies to a sub set of elements found on a page.