Rule

List structure

Lists must only contain list items.

Rule
list-structure
WCAG 2.2
1.3.1 Info and Relationships (opens in a new tab) (Level A)
Severity
Serious

What it checks

A <ul> or <ol> may only hold list items. The rule fails a list with a direct child that is not an <li>, such as a heading or paragraph, because screen readers then misreport the number of items and where each one sits. An <li> given another role, such as role="group" on carousel slides, no longer counts as an item.

Plain <div> and <span> wrappers around items pass, as long as they hold no text of their own. So do children that are never rendered. A list where every item has role="none" or role="presentation" fails, since it announces a list with no items. A list given another role is left to the ARIA rules.

Example

Fails

<ul>
  <h3>Before you start</h3>
  <li>Your passport number</li>
  <li>A recent photo</li>
</ul>

Passes

<h3>Before you start</h3>
<ul>
  <li>Your passport number</li>
  <li>A recent photo</li>
</ul>

The engine is tested against both examples.

How to fix it

Keep only <li> elements directly inside the list, and move headings and other content outside it.

Check your own pages

This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.