Back

list

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

Why it matters

Screen readers announce list semantics ("list, 4 items") based on proper <li> structure — other elements as direct children break that announcement and can hide items from assistive tech entirely.

How to fix it

Make sure only <li> (or <script>/<template>) elements are direct children of <ul>/<ol>. Move any other markup inside an <li>.

Technical reference (Deque University)
<ul> and <ol> must only directly contain <li>, <script>, or <template> elements | Pallyfi Accessibility Guidance