Valid children in list elements
Last updated:
How to fix this issue?
Place only <li>, <script>, or <template> elements as direct children of <ul> or <ol>:
CORRECT:
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ul>
CORRECT:
script and template are allowed
<ul>
<li>First item</li>
<script>/* ... */</script>
<template>...</template>
</ul>
If you need to add extra markup around list items, move that markup inside the <li> element:
BAD:
<ul>
<div>
<li>First item</li>
</div>
</ul>
CORRECT:
<ul>
<li>
<div>First item</div>
</li>
</ul>
Why is this important?
Screen readers announce the number of items in a list to help users navigate. Invalid child elements break the list structure, which causes screen readers to report incorrect information or skip items entirely.
More info:
Rule info
Standard
WCAG A SC 1.3.1
User impact
Serious impact Significantly hinders users with disabilities. Should be fixed as a high priority. Critical : blocks access entirely Serious : significantly hinders use Moderate : causes difficulty Minor : minimal disruptionFix complexity
High level of required technical expertise To resolve this issue, you need technical expertise in software engineering. Resolving this issue requires modifying the software code, for which you need a background in software engineering.Affects
Visual People with vision related disabilities can include those with color blindness, low vision, or complete blindness. Providing alternative text (also known as alt text) for graphical content is especially important for these individuals, as it allows assistive technologies such as screen readers to describe the content to them.
Free Website Accessibility Audit
Was this article helpful?
Thanks for your feedback!