WCAGdesk
axe-core: list · WCAG 1.3.1 Info and Relationships · Level A

How to fix the “list” accessibility issue

The axe-core list rule fails when a <ul> or <ol> contains anything other than <li> (and script/template) as a direct child. Screen readers then misreport the list — wrong item count or no list at all. Relates to WCAG 2.2 1.3.1 (Level A).

What axe-core checks

axe-core fails a list whose direct children are not all <li> elements — e.g. a <div> or <a> dropped directly inside the <ul>.

Which standard this maps to

WCAG 2.21.3.1 Info and Relationships (Level A)
EN 301 5499.1.3.1
BFSG / EAABFSG § 12 via EN 301 549 · EAA Annex I
CategoryStructure & Landmarks

Why it matters

Navigation menus, product grids and filters are usually lists. When a wrapper <div> sits directly inside the <ul>, a screen reader may announce “list, 0 items”, hiding the whole menu. The companion listitem rule flags the inverse — an <li> outside a list.

Common causes

  • A <div> wrapper placed directly inside a <ul>
  • Links or headings as direct list children
  • A grid library injecting non-<li> nodes
  • Whitespace-only text — usually fine, but custom nodes break it

How to fix it

Make every direct child of a <ul>/<ol> an <li>. Move wrappers inside the <li>, not between the list and its items.

<!-- Fails -->
<ul><div><li>One</li><li>Two</li></div></ul>

<!-- Passes -->
<ul><li>One</li><li>Two</li></ul>

FAQ

Can I style li with flex/grid?

Yes — apply display:flex/grid on the <ul> or <li>. The DOM structure must stay ul > li; CSS layout is independent.

What is the listitem rule?

It is the inverse check: an <li> that is not inside a <ul>/<ol>/role=list. Fix both together.

Find every issue like this on your site

Run a free WCAG 2.2 AA scan — real axe-core engine, no signup. Or get a timestamped evidence report for €29.