List
Moderate effortFound on 35% of audited stores.
Fix all HTML lists so that only valid child elements appear directly inside `<ul>` and `<ol>` tags, and only `<ul>` or `<ol>` elements wrap `<li>` items.
What it is
HTML has strict rules about how lists must be structured. An unordered list (`<ul>`) or ordered list (`<ol>`) should contain only `<li>` (list item) elements as direct children — nothing else. Likewise, every `<li>` must live inside a `<ul>`, `<ol>`, or `<menu>` element. A "list" violation means your page has markup that breaks these rules: for example, a `<div>` or `<p>` placed directly inside a `<ul>`, bare `<li>` tags floating outside any list container, or `<li>` elements nested inside each other without a proper parent. These mistakes are often invisible to sighted visitors, but they create a broken experience for users who rely on assistive technology such as screen readers.
Why it matters
Screen readers (used by roughly 7 million Americans) use list structure to announce "list of 5 items" and let users jump between items quickly. Broken list markup confuses this navigation, causing screen reader users to miss navigation menus, product feature lists, size guides, and checkout steps — directly costing you customers and raising legal exposure under ADA, Section 508, and the European Accessibility Act. Google also uses semantic HTML to understand page structure; malformed lists can weaken how well your navigation and content are parsed. Because courts have increasingly applied ADA Title III to e-commerce websites, incorrect accessibility markup is a genuine legal risk, not just a best-practice issue.
How to fix it
- Audit your pages: use a browser DevTools inspector or an accessibility tool (e.g. axe browser extension) to locate every reported list error — look for red flags like `<div>` or `<span>` directly inside `<ul>`/`<ol>`, or `<li>` tags with no list parent.
- Fix invalid children: any element that is a direct child of `<ul>` or `<ol>` but is NOT an `<li>` (or `<script>`/`<template>`) must either be wrapped in an `<li>`, moved outside the list, or replaced with a proper `<li>`.
- Fix orphaned list items: any `<li>` that does not have a `<ul>`, `<ol>`, or `<menu>` parent must be wrapped in the correct list container.
- Check nested lists: a list nested inside another list must be placed INSIDE an `<li>` element — never as a direct sibling child of the outer `<ul>`/`<ol>`.
- Review generated/theme markup: navigation menus, breadcrumbs, product feature bullets, footer links, and mega-menus are the most common sources of list errors in ecommerce themes — inspect these areas specifically.
- Re-test: run the axe browser extension or another automated scanner on affected pages to confirm zero remaining list violations before publishing.
Fix it on your platform
Pick your platform for the exact steps.
How to fix list on Shopify
- In your Shopify Admin, go to Online Store → Themes → click the '...' (Actions) menu next to your active theme → Edit code.
- The most common list errors live in navigation and footer snippets. Open sections/header.liquid (or snippets/navigation.liquid) and locate any `<ul>` used for the nav menu — ensure every direct child is `<li>`.
- Open sections/footer.liquid and repeat the check for footer link lists.
- For product feature bullets, open sections/product-template.liquid (or the relevant product section file) and confirm `<ul>`/`<ol>` contains only `<li>` children.
- If your theme uses a mega-menu or third-party navigation app, check that app's own settings or custom HTML blocks for the same pattern.
- Save each file, then use the Shopify Theme Preview to verify appearance, and re-run the axe browser extension to confirm no remaining list violations.
How to fix list on WooCommerce
- In WordPress Admin, go to Appearance → Theme File Editor (or use a child theme via FTP/SFTP to avoid overwriting on updates).
- Open header.php and any navigation-related template parts (e.g. inc/navigation.php, template-parts/header/site-branding.php) — confirm all `<ul>` nav menus contain only `<li>` children.
- Check footer.php for footer widget list markup.
- For WooCommerce-specific pages, locate woocommerce/templates/ (or your theme's overrides in yourtheme/woocommerce/) — inspect product loops, breadcrumbs (breadcrumb.php), and widget templates.
- If using a page builder (Elementor, Divi), open the affected page in the builder, find the List or Nav widget, and switch to its HTML/Custom Code view to correct the markup.
- Save, clear your caching plugin cache, and re-test with the axe browser extension.
How to fix list on BigCommerce
- In BigCommerce Admin, go to Storefront → My Themes → click Customize on your active theme → select Edit Theme Files (Advanced).
- Open templates/components/header.html and templates/components/navigation/ — locate the nav `<ul>` blocks and ensure only `<li>` elements are direct children.
- Open templates/components/footer.html and repeat the check for footer link lists.
- For category/product pages, check templates/pages/category.html and templates/pages/product.html for any custom list markup.
- Stencil CLI users: make changes locally in the appropriate Handlebars template files, then run `stencil push` to deploy.
- Re-test with axe after pushing the theme update.
How to fix list on Wix
- Open the Wix Editor for your site.
- Click on any navigation menu element → click 'Settings' or 'Design' → use the built-in menu widget rather than manually coding a list; Wix's native menu component outputs correct list HTML automatically.
- For custom HTML list content (e.g. in an HTML Embed widget), click the widget → 'Enter Code' and manually correct any malformed `<ul>`/`<ol>` markup in the code panel.
- For Wix Studio (advanced): open the page, select the element, open the Properties & Events panel, and switch to Dev Mode (Enable Dev Mode in the top bar) to inspect and edit generated HTML via Velo if needed.
- If using a Wix Blog or Wix Stores component, these output semantic HTML automatically — verify by running axe on the live page.
- Publish the site and re-run your accessibility scan.
How to fix list on Squarespace
- In Squarespace, go to Pages → select the affected page → click Edit.
- For navigation: Squarespace auto-generates nav HTML — if errors appear here, go to Design → Navigation Styles and switch to a different nav style, or use the Footer editor to rebuild footer links using the built-in Link Block rather than a Code Block.
- For body content lists: click on the text block containing the list → highlight the items → use the text editor toolbar's List button (bulleted or numbered) to convert them to a proper Squarespace list, which outputs correct `<ul>`/`<li>` markup.
- For custom Code Blocks (Settings → Advanced → Code Injection or a Code Block on a page): open the code block and manually correct the `<ul>`/`<ol>` HTML to ensure only `<li>` children are used.
- Save and re-publish the page, then re-test with axe.
How to fix list on Webflow
- Open Webflow Designer for your project.
- In the Navigator panel (left sidebar), locate any List element (tagged as `<ul>` or `<ol>`) — click it to select it.
- In the Elements panel, verify that every child of the List is a List Item (`<li>`). If you see a Div Block, Text Block, or other element as a direct child of the List, drag it inside an existing List Item or wrap it: right-click → Wrap in List Item.
- For nav menus: select the Navbar component → open its settings — Webflow's Navbar outputs `<nav>` with an unordered list; ensure no extra Div Blocks are placed as direct children of that list in the Navigator.
- For CMS-generated lists: open the Collection List settings and ensure the Collection List Wrapper (`<ul>`) contains only Collection Items (`<li>`).
- Publish the site and validate with the axe browser extension.
How to fix list on Adobe Commerce (Magento)
- SSH or SFTP into your server and navigate to your active theme directory: app/design/frontend/[Vendor]/[Theme]/.
- The most common sources of list errors are: Magento_Theme/templates/html/header.phtml (site header/nav), Magento_Theme/templates/html/footer.phtml, and Magento_Catalog/templates/product/ (product feature lists).
- Open the relevant .phtml file, locate any `<ul>` or `<ol>` blocks, and ensure every direct child is `<li>`. Move any `<div>` or `<p>` wrappers inside `<li>` tags.
- If the nav menu is generated by Magento_Theme/templates/html/topmenu.phtml or a navigation module, open that file and apply the same fix.
- Run `bin/magento cache:clean && bin/magento cache:flush` after saving template changes.
- Re-test on the frontend with the axe browser extension to confirm all list violations are resolved.
How to fix list on WordPress.org
- 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.
- Open the file in a code editor (or Appearance → Theme File Editor) and search for '<ul', '<ol', '<li' to locate invalid nesting.
- Correct the markup: only <li> as direct children of <ul>/<ol>, and every <li> must live inside a list container.
- 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.
- Clear caching (plugin or server), then re-audit with the axe DevTools extension.
How to fix list on Drupal
- 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').
- Open the template and verify that any <ul> or <ol> loop outputs <li> wrappers correctly: {% for item in items %}<li>{{ item.content }}</li>{% endfor %}.
- 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.
- 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 scan to find list — and every other issue — across your whole site in minutes.
Scan my site freeFrequently asked questions
What is List?
HTML has strict rules about how lists must be structured. An unordered list (`<ul>`) or ordered list (`<ol>`) should contain only `<li>` (list item) elements as direct children — nothing else. Likewise, every `<li>` must live inside a `<ul>`, `<ol>`, or `<menu>` element. A "list" violation means your page has markup that breaks these rules: for example, a `<div>` or `<p>` placed directly inside a `<ul>`, bare `<li>` tags floating outside any list container, or `<li>` elements nested inside each other without a proper parent. These mistakes are often invisible to sighted visitors, but they create a broken experience for users who rely on assistive technology such as screen readers.
Why does list matter?
Screen readers (used by roughly 7 million Americans) use list structure to announce "list of 5 items" and let users jump between items quickly. Broken list markup confuses this navigation, causing screen reader users to miss navigation menus, product feature lists, size guides, and checkout steps — directly costing you customers and raising legal exposure under ADA, Section 508, and the European Accessibility Act. Google also uses semantic HTML to understand page structure; malformed lists can weaken how well your navigation and content are parsed. Because courts have increasingly applied ADA Title III to e-commerce websites, incorrect accessibility markup is a genuine legal risk, not just a best-practice issue.
How do I fix list?
Fix all HTML lists so that only valid child elements appear directly inside `<ul>` and `<ol>` tags, and only `<ul>` or `<ol>` elements wrap `<li>` items.
Authoritative references
- How to fix this specific rule — Deque/axe (rule reference)
- WCAG 2 overview — W3C WAI
- Web accessibility tutorials — W3C WAI
- ARIA basics — MDN