<li> elements must be contained in a <u>l or <ol>

Rule Description

All list items (<li>) must be contained within <ul> or <ol> parent elements.

The Algorithm, in Simple Terms

Ensures that every list item is used semantically

Why this is Important

For a list to be valid, it must have both parent and child elements. Parent elements can either be a set of <ul> tags or a set of <ol> tags. Child elements must be declared inside of these tags using the <li> tag.

Screen readers notify users when they come to a list, and tell them how many items are in a list. This helps listeners know what they are listening to, and what to expect as they listen to it.

If you don't mark up a list using proper semantic markup in a hierarchy, list items cannot inform the listener that they are listening to a list when there is no parent indicating the presence of a list and the type of list.

Compliance Data & Impact

User Impact: Critical
Disabilities Affected:
  • Blindness
  • Deafness
  • Mobility/Dexterity
Severity: Critical
Issue Type:
  • WCAG 2.0 (A): MUST
  • WCAG 2.1 (A): MUST
WCAG Success Criteria:
  • 1.3.1 Info and Relationships
Section 508 Guidelines:
  • Not applicable

How to Fix the Problem

Ensure that all list item <li> elements are wrapped inside of <ul> or <ol> parent elements.

List items may be contained in either an unordered (bullet) list or an ordered (sequentially numbered) list.

Screen readers notify users when they come to a list, and tell them how many items are in a list. This helps listeners know what they are listening to, and what to expect as they listen to it. To ensure screen readers can inform the listener that they are listening to a list, child item elements must be contained within the appropriate parent list elements.

Bad example

<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>

Good example

<ul>
    <li>Coffee</li>
    <li>Tea</li>
    <li>Milk</li>
</ul>

Related Deque University Course Pages

Other Related Resources

Additional Information

Relevant Technologies:
  • HTML 4
  • HTML5
Test Reliability: Automated testing is possible, with high accuracy
Rule ID: listitem