Skip to content
Learn Measure Blog Case studies About
On this page
  • How this Lighthouse audit fails
  • How to create correctly structured lists
  • Resources

Lists do not contain only <li> elements and script supporting elements (<script> and <template>)

May 2, 2019 — Updated Sep 19, 2019
Appears in: Accessibility audits
On this page
  • How this Lighthouse audit fails
  • How to create correctly structured lists
  • Resources

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 (<script> and <template>).

How this Lighthouse audit fails #

Lighthouse flags lists that contain content elements that shouldn't be in a list:

Lighthouse audit showing lists contain content elements that shouldn't be within the lists
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 <li>, <script> or <template> elements.

Valid lists must have parent elements (<ul> or <ol> elements) and child elements (<li> elements). Any other content elements are invalid.

Resources #

  • Source code for Lists do not contain only <li> elements and script supporting elements (<script> and <template>) audit
  • <ul> and <ol> must only directly contain <li>, <script> or <template> elements (Deque University)
Last updated: Sep 19, 2019 — Improve article
Return to all articles
Share
subscribe

Contribute

  • File a bug
  • View source

Related content

  • developer.chrome.com
  • Chrome updates
  • Web Fundamentals
  • Case studies
  • Podcasts
  • Shows

Connect

  • Twitter
  • YouTube
  • Google Developers
  • Chrome
  • Firebase
  • Google Cloud Platform
  • All products
  • Terms & Privacy
  • Community Guidelines

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies.