Rule
List item placement
<li> must be inside a list.
- Rule
listitem-parent- WCAG 2.2
- 1.3.1 Info and Relationships (opens in a new tab) (Level A)
- Severity
- Serious
What it checks
An <li> is only a list item inside a list: a <ul>, <ol>, <menu> or an element with role="list". The rule fails an <li> with no list above it, so screen readers lose the item count and position.
Plain <div> and <span> wrappers and elements with role="none" between the item and its list are fine. A list element given a different role, such as <ul role="navigation">, is no longer a list, so its items fail. So do items behind a role="group" wrapper inside a list, because a list may only own items directly.
Example
Fails
<div class="menu">
<li><a href="/">Home</a></li>
<li><a href="/shop">Shop</a></li>
</div>
Passes
<ul class="menu">
<li><a href="/">Home</a></li>
<li><a href="/shop">Shop</a></li>
</ul>
The engine is tested against both examples.
How to fix it
Wrap the items in a <ul> or <ol>. If a list needs a landmark, put the role on a wrapping element, such as <nav>, rather than on the list.
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.