Screen readers and other assistive technologies depend on lists being structured properly to keep users informed of content within the lists. The only content lists should contain should be within
<li> elements. They can also contain script supporting elements (
How this Lighthouse audit fails
Lighthouse flags lists that contain content elements that shouldn't be in a list:
The Lighthouse Accessibility score is a weighted average of all the accessibility audits. See the Lighthouse accessibility scoring post for more information.
How to create correctly structured lists
Remove any elements in lists that don't belong there. Ordered and unordered lists must only contain
Valid lists must have parent elements (
<ol> elements) and child elements (
<li> elements). Any other content elements are invalid.
- Source code for Lists do not contain only
<li>elements and script supporting elements (
<ol>must only directly contain
<template>elements (Deque University)