List items (<li>
) are not contained within <ul>
or <ol>
parent elements
— Updated
Appears in: Accessibility audits
Screen readers and other assistive technologies require list items (<li>
) to be contained within parent <ul>
or <ol>
to be announced properly.
When assistive technologies come to a list, they notify users how many items are within the list. If you don't wrap list items in a parent list element, assistive technologies can't set user expectations correctly.
How this Lighthouse audit fails #
Lighthouse flags list items (<li>
) that aren't contained in <ul>
or <ol>
parent elements:
How to fix orphaned list items #
Wrap any orphaned <li>
elements inside a <ul>
or <ol>
element.
Resources #
- Source code for List items (
<li>
) are not contained within<ul>
or<ol>
parent elements audit <li>
elements must be contained in a<ul>
or<ol>
(Deque University)
Last updated: — Improve article