listitem-parent-valid
List items must be inside a list container
automaticWCAG 1.3.1 (A)confidence: highseverity: seriousperceivable
Checks that <li> elements are contained by <ul>, <ol>, or an element with role="list".
Applies to. Applies to <li> elements that have a parent element.
Expectation. The parent is <ul>/<ol> with no role override, or an element with an explicit role of "list", "presentation", or "none". An <li> used outside a real list container (e.g. as a generic flex/grid item under a <div>) is not exposed as a list item to assistive technologies.
Examples
pass
<ul><li>Apple</li></ul>
`<li>` is inside a `<ul>`.
fail
<div><li>Date</li></div>
`<li>` has no `<ul>`/`<ol>`/`role="list"` ancestor.