List

Moderate effort

Found on 19% of audited stores.

Fix all HTML list elements so that `<ul>` and `<ol>` contain only valid `<li>` children, and `<li>` elements appear only inside a proper list container, ensuring correct semantic list structure throughout your store.

What it is

HTML has three types of lists: unordered (`<ul>`, bullet lists), ordered (`<ol>`, numbered lists), and description lists (`<dl>`). Each has strict rules about which child elements are allowed inside it. A `<ul>` or `<ol>` must contain only `<li>` items (and optionally `<script>` or `<template>` tags); a `<dl>` must contain only `<dt>` and `<dd>` elements; and an `<li>` must always be a direct child of a `<ul>`, `<ol>`, or `<menu>`. When these rules are broken — for example, a `<div>` placed directly inside a `<ul>`, or an `<li>` used outside any list — the list structure is considered invalid. WCAG Success Criterion 1.3.1 ("Info and Relationships") requires that structure and meaning conveyed visually also be available in the code so assistive technologies can understand it.

Why it matters

Screen readers used by blind or low-vision shoppers rely entirely on correct list markup to announce how many items are in a list, let users jump between lists, and convey grouped relationships like navigation menus, product feature bullets, or breadcrumbs. When list structure is broken, screen readers may either skip the content entirely or read it as a confusing wall of disconnected text — causing real shoppers to miss product benefits, navigation options, or checkout steps. Beyond accessibility, invalid HTML can confuse search-engine crawlers that use list structure as a signal for site navigation and content hierarchy, which can indirectly harm rankings. In many jurisdictions (USA ADA, EU EAA, UK Equality Act), inaccessible storefronts carry genuine legal risk; a broken list on a navigation menu or product page is exactly the kind of straightforward violation that appears in accessibility demand letters.

How to fix it

  1. Identify the offending list element: use your browser's DevTools (right-click → Inspect) or an accessibility checker to find the exact `<ul>`, `<ol>`, `<dl>`, or `<li>` tag flagged.
  2. Check what is directly inside a `<ul>` or `<ol>`: every direct child must be an `<li>`. If you find `<div>`, `<span>`, `<p>`, `<a>`, or any other element as a direct child, move that content inside an `<li>` wrapper.
  3. Check every `<li>` to make sure it lives inside a `<ul>`, `<ol>`, or `<menu>` — never floating loose inside a `<div>` or `<nav>` without a parent list tag.
  4. For description lists (`<dl>`), ensure direct children are only `<dt>` (term) and `<dd>` (description) elements — no bare text nodes or `<div>` wrappers (a `<div>` is allowed inside `<dl>` in HTML5 only as a grouping wrapper containing `<dt>`/`<dd>` pairs, not as a sibling to them).
  5. If you are using a navigation menu built with a theme or plugin, inspect its template/component and replace any non-`<li>` direct children of the `<ul>` with properly wrapped `<li>` elements, keeping your links or content inside the `<li>`.
  6. After editing, re-run an accessibility checker (axe DevTools browser extension, WAVE, or your platform's built-in audit) to confirm the 'list' rule now passes.
<!-- ❌ INCORRECT: <div> as direct child of <ul> -->
<ul>
  <div class="item">Feature one</div>
  <div class="item">Feature two</div>
</ul>

<!-- ✅ CORRECT: only <li> as direct children -->
<ul>
  <li class="item">Feature one</li>
  <li class="item">Feature two</li>
</ul>

<!-- ❌ INCORRECT: <li> outside a list -->
<nav>
  <li><a href="/shop">Shop</a></li>
</nav>

<!-- ✅ CORRECT: <li> inside <ul> inside <nav> -->
<nav>
  <ul>
    <li><a href="/shop">Shop</a></li>
  </ul>
</nav>

Fix it on your platform

Pick your platform for the exact steps.

How to fix list on Shopify
  1. From your Shopify Admin, go to Online Store → Themes → your active theme → Actions → Edit code.
  2. Identify which template or section file contains the broken list. Navigation menus are typically in 'sections/header.liquid' or 'snippets/nav.liquid'; product feature lists may be in 'sections/product-template.liquid' or a similar file.
  3. Use the built-in code editor's search (Ctrl/Cmd+F) to search for '<ul', '<ol', or '<li' and inspect their immediate children.
  4. Wrap any non-<li> direct children of <ul>/<ol> inside <li> tags, or ensure every <li> is nested inside a <ul> or <ol>.
  5. Save the file, then preview your store and re-run axe DevTools or WAVE on the affected page to confirm the issue is resolved.
  6. If the broken list comes from a third-party app, contact the app developer — you cannot safely edit app-injected markup without risking update conflicts.
How to fix list on WooCommerce
  1. Log in to WordPress Admin → Appearance → Theme File Editor (or use a code editor via FTP/SFTP for a safer workflow).
  2. Navigation lists are commonly in 'header.php', 'functions.php' (walker classes), or a dedicated 'nav-menus.php'. Product feature lists are in WooCommerce template overrides under 'yourtheme/woocommerce/'.
  3. Search the relevant template file for '<ul', '<ol', or '<li' and verify that only <li> elements are direct children of any <ul>/<ol>.
  4. To override a WooCommerce core template without losing updates, copy the original file from 'wp-content/plugins/woocommerce/templates/' into 'wp-content/themes/yourtheme/woocommerce/' and then edit the copy.
  5. If a page builder (Elementor, Divi, etc.) built the page, open the page in the builder, locate the List or Nav widget, and fix the markup via the widget settings rather than editing raw HTML.
  6. Save, clear any caching plugins (e.g. WP Rocket, W3 Total Cache), and re-audit with the axe DevTools browser extension.
How to fix list on BigCommerce
  1. Go to BigCommerce Admin → Storefront → My Themes → your active theme → Advanced → Edit Theme Files.
  2. Navigation markup is usually in 'templates/components/header/navigation.html' or a similar component file; product details are in 'templates/pages/product.html'.
  3. Search for '<ul', '<ol', or '<li' and correct any invalid nesting: all direct children of <ul>/<ol> must be <li>, and all <li> must have a <ul>/<ol> parent.
  4. If you use Page Builder widgets, switch to the HTML view of the widget and fix the markup inline.
  5. Publish the theme changes, then use axe DevTools or WAVE on the live page to confirm the list rule passes.
How to fix list on Wix
  1. Open the Wix Editor for your site.
  2. Wix generates most HTML automatically from its widgets, so you cannot directly edit the underlying list markup for built-in menus. However, for custom HTML you added via the Wix HTML iFrame widget (Add → Embed → Custom Code or HTML iFrame), click the widget and select 'Edit Code' to find and fix broken list markup.
  3. For navigation menus, use the built-in Menu widget (Add → Menu & Anchor → Menus) — it generates semantically correct list HTML. Remove any custom code that replicates navigation with non-list markup.
  4. For text content with bullet lists, use the Wix Text Editor's built-in list formatting buttons instead of manually typing dashes or symbols, which produce non-semantic output.
  5. After saving, use the axe DevTools browser extension on your published site to verify the violation is resolved.
How to fix list on Squarespace
  1. In the Squarespace Editor, go to Pages → select the affected page → Edit.
  2. For content blocks, click a Text block and use the built-in bulleted or numbered list buttons in the toolbar (rather than manually entering dashes or numbers). This ensures Squarespace outputs proper <ul>/<li> or <ol>/<li> markup.
  3. For navigation, Squarespace's built-in navigation renders semantically correct list HTML. Avoid injecting custom navigation via Code Blocks unless you are certain of correct list structure.
  4. If you have injected custom HTML via Settings → Advanced → Code Injection or a Code Block, click that block, review any <ul>/<ol>/<li> usage, and correct invalid nesting.
  5. After publishing, run axe DevTools or WAVE on the live URL to confirm the list structure passes.
How to fix list on Webflow
  1. Open the Webflow Designer for your project.
  2. In the Navigator panel (left sidebar), locate the List element that is flagged. Webflow has dedicated 'List' and 'List Item' elements that enforce correct structure when used properly.
  3. If you have placed a Div Block directly inside a List element (instead of inside a List Item), select the Div Block in the Navigator and drag it inside a 'List Item' element, or wrap it: right-click the element → Wrap in → List Item.
  4. Never place a List Item element outside a List container in the Navigator — if you find one, drag it inside the appropriate List.
  5. For any custom HTML added via an Embed element, click the Embed block → open the code editor → inspect and fix any malformed list HTML.
  6. Publish the site and re-run the accessibility audit via axe DevTools to confirm the issue is resolved.
How to fix list on Adobe Commerce (Magento)
  1. Identify which template (.phtml) or layout XML file generates the broken list. Navigation is commonly in 'Magento_Theme/templates/html/header.phtml' or a custom module; product attributes may be in 'Magento_Catalog/templates/product/view/attributes.phtml'.
  2. To safely override a core template, copy it into your custom theme directory at 'app/design/frontend/<Vendor>/<theme>/<Module>/templates/...' mirroring the original path.
  3. Open the copied template and search for '<ul', '<ol', or '<li'. Fix any invalid nesting: wrap non-<li> direct children inside <li> tags, and ensure all <li> elements are inside a <ul>, <ol>, or <menu>.
  4. Run 'bin/magento cache:flush' and 'bin/magento setup:static-content:deploy' (if in production mode) to apply the changes.
  5. Verify by loading the affected page and running axe DevTools or WAVE in the browser.
How to fix list on WordPress.org
  1. To avoid losing changes on theme updates, create a child theme. Copy the offending template file (e.g. 'header.php', 'page.php') into your child theme directory.
  2. Open the file in a code editor (or Appearance → Theme File Editor) and search for '<ul', '<ol', '<li' to locate invalid nesting.
  3. Correct the markup: only <li> as direct children of <ul>/<ol>, and every <li> must live inside a list container.
  4. For menus, WordPress outputs standard <ul>/<li> structure via 'wp_nav_menu()'. If a custom Walker class is used (often in 'functions.php'), find the walker and correct the render_list_item / start_el methods to output proper <li> tags.
  5. Clear caching (plugin or server), then re-audit with the axe DevTools extension.
How to fix list on Drupal
  1. Broken list markup in Drupal usually originates in a Twig template. Find the relevant template in your theme's 'templates/' folder (e.g. 'menu.html.twig', 'item-list.html.twig').
  2. Open the template and verify that any <ul> or <ol> loop outputs <li> wrappers correctly: {% for item in items %}<li>{{ item.content }}</li>{% endfor %}.
  3. If the issue is in a contributed module's template, copy the template into your theme's templates directory (Drupal's template override system), then fix it there.
  4. Run 'drush cr' (cache rebuild) or go to Configuration → Performance → Clear all caches, then re-audit the page.

Does your site have this issue?

Run a free SEOLZ audit to find list — and every other issue — across your whole site in minutes.

Scan my site free

Frequently asked questions

What is List?

HTML has three types of lists: unordered (`<ul>`, bullet lists), ordered (`<ol>`, numbered lists), and description lists (`<dl>`). Each has strict rules about which child elements are allowed inside it. A `<ul>` or `<ol>` must contain only `<li>` items (and optionally `<script>` or `<template>` tags); a `<dl>` must contain only `<dt>` and `<dd>` elements; and an `<li>` must always be a direct child of a `<ul>`, `<ol>`, or `<menu>`. When these rules are broken — for example, a `<div>` placed directly inside a `<ul>`, or an `<li>` used outside any list — the list structure is considered invalid. WCAG Success Criterion 1.3.1 ("Info and Relationships") requires that structure and meaning conveyed visually also be available in the code so assistive technologies can understand it.

Why does list matter?

Screen readers used by blind or low-vision shoppers rely entirely on correct list markup to announce how many items are in a list, let users jump between lists, and convey grouped relationships like navigation menus, product feature bullets, or breadcrumbs. When list structure is broken, screen readers may either skip the content entirely or read it as a confusing wall of disconnected text — causing real shoppers to miss product benefits, navigation options, or checkout steps. Beyond accessibility, invalid HTML can confuse search-engine crawlers that use list structure as a signal for site navigation and content hierarchy, which can indirectly harm rankings. In many jurisdictions (USA ADA, EU EAA, UK Equality Act), inaccessible storefronts carry genuine legal risk; a broken list on a navigation menu or product page is exactly the kind of straightforward violation that appears in accessibility demand letters.

How do I fix list?

Fix all HTML list elements so that `<ul>` and `<ol>` contain only valid `<li>` children, and `<li>` elements appear only inside a proper list container, ensuring correct semantic list structure throughout your store.

Authoritative references

Related Accessibility (WCAG) issues