This check finds unordered or ordered lists whose direct children are not <li> elements or allowed script-supporting elements.
Why this matters
List semantics communicate that items belong together and often announce the number of items. Invalid wrappers can break that structure or cause browsers to repair the DOM differently than expected.
How to fix it
- Make each logical item a direct
<li>child of the<ul>or<ol>. - Place headings, links, paragraphs, and layout wrappers inside the relevant list item.
- Nest a sublist inside the parent
<li>, not directly beside it without an item. - Use neutral containers such as
<div>when the content is not actually a list.
When the finding appears across many URLs, fix the shared component or layout that produces it instead of patching generated HTML page by page. Recheck representative templates and responsive states after deployment so the correction does not create a regression elsewhere.
How to verify the fix
Inspect the rendered DOM after component hydration. Confirm list items have the correct parent and use an accessibility tree or screen reader to check the announced list size and nesting.
Keep before-and-after evidence for the affected URL, original output, correction, and verification method. If markup changes after load, test consent states, localization, responsive variants, and client-side navigation because the initial HTML and rendered DOM can differ.