Welcome Check Web

Structure · WCAG 2.0 Level A

<ul> and <ol> must only directly contain <li>, <script> or <template> elements

Ensure that lists are structured correctly.

What it means

The list rule flags elements that fail this check. It maps to WCAG success criterion 1.3.1.

Who it affects

Screen reader users who navigate by structure, and people who change text spacing or orientation.

How to fix it

Only <li> elements (plus script and template) may be direct children of <ul> and <ol>.

<ul>
  <li>First</li>
  <li>Second</li>
</ul>

Check it on your site

Run a free scan. If this rule fails, the results list the affected elements. Deque, which maintains axe-core, also documents this rule in detail: Deque University: list.

Quick answers

What does the axe rule "list" check?

Ensure that lists are structured correctly.

How do I fix "<ul> and <ol> must only directly contain <li>, <script> or <template> elements"?

Only <li> elements (plus script and template) may be direct children of <ul> and <ol>.

Who is affected by list failures?

Screen reader users who navigate by structure, and people who change text spacing or orientation.

Automated accessibility scan. Results are informational and may not identify every accessibility issue. This service is not legal advice, a compliance certification, or a substitute for comprehensive manual accessibility testing.