List items (<li>) are contained within <ul>, <ol> or <menu> parent elements

List items are nested inside a valid parent list element.

On this page

Impact

ScanGov impact ratings

About

Screen readers require list items (<li>) to be contained within a parent <ul>, <ol> or <menu> to be announced properly.

Risks

Screen readers announce structured content incorrectly.

Why it's important

Helps screen readers announce structured content (tables, lists) in a logical order that users can understand.

User stories

As a screen reader user, I want tables and lists to be properly structured so that I can understand the relationships between items.

Code

Failing pattern:

<!-- Fail: li outside a list -->
<li>Orphaned item</li>

Passing pattern:

<!-- Pass: li inside ul or ol -->
<ul>
  <li>Item</li>
</ul>

Error

ScanGov messaging when a site fails a standard:

Failed: List items (<li>) are contained within <ul>, <ol> or <menu> parent elements

Guidance

Indicators

On this page