Skip to main content
Accessibility Axe Core 4.7

<ul> and <ol> must only directly contain <li>, <script> or <template> elements

About This Accessibility Rule

Lists must be correctly marked up, which means they cannot contain content components other than li elements.

Lists are read aloud in a specific manner by screen readers. This feature makes lists easier to comprehend, but it will only function if the lists are correctly organized.

When content elements other than list items are contained within a set of list elements, screen readers are unable to indicate to the user that they are listening to list items.

Any other content elements are invalid.

Although non-content elements such as script, template, style, meta, link, map, area, and datalist are allowed in lists, content elements other than li are not.

What this Accessibility Rule Checks

Ensures that lists are properly constructed.

Help us improve our guides

Was this guide helpful?

Detect accessibility issues automatically

Rocket Validator scans thousands of pages with Axe Core and the W3C Validator, finding accessibility issues across your entire site.

Ready to validate your sites?
Start your trial today.