How to fix listitem on Adobe Commerce (Magento)

Ensure every `<li>` element is a direct child of a `<ul>` or `<ol>` element (or an element explicitly given `role="list"`), so that screen readers can correctly announce list structure to users.

Steps for Adobe Commerce (Magento)

  1. SSH into your server (or use your local development environment) and navigate to your active theme directory: `app/design/frontend/<Vendor>/<theme>/`.
  2. Use a text editor or IDE to search for the template file (.phtml) that renders the broken list — common locations are `Magento_Theme/templates/html/header.phtml`, `Magento_Catalog/templates/product/list.phtml`, or a custom module template.
  3. In the .phtml file, locate the `<li>` element and confirm its direct parent. If it is a `<div>` or other non-list tag, wrap the `<li>` block in `<ul>...</ul>` (or `<ol>` if appropriate).
  4. If the layout is controlled by a layout XML file (`default.xml`, `catalog_category_view.xml`, etc.), check whether a container is overriding the list's HTML tag — correct the `htmlTag` attribute to `ul` or `ol` in the relevant XML block.
  5. Run `bin/magento cache:clean` and `bin/magento cache:flush` after making template changes.
  6. Verify on the frontend using axe DevTools or the Chrome Accessibility panel to confirm the fix.
Official Adobe Commerce (Magento) documentation ↗

What is listitem?

HTML lists are built from two parts: a container (`<ul>` for unordered, `<ol>` for ordered) and its items (`<li>`). When a `<li>` element's parent is something other than `<ul>`, `<ol>`, or an element with `role="list"`, the list structure is broken. This means a screen reader — the software blind and low-vision shoppers use to navigate — cannot tell the user they are inside a list, how many items it contains, or let them jump between items efficiently. The WCAG success criterion 1.3.1 (Info and Relationships) requires that structure conveyed visually (like a list of product features or navigation links) also be conveyed in the underlying code.

Screen reader users rely on correct list markup to understand and navigate your page — if list items are orphaned from their parent container, assistive technology may read each item as isolated, unrelated text, destroying the meaning of product feature lists, navigation menus, breadcrumbs, and shopping cart line items. This is a WCAG 2.x Level A failure (the most severe category), which creates legal accessibility risk under laws like the ADA in the US, the EAA in Europe, and equivalent legislation worldwide — online retailers have faced lawsuits and regulatory action over exactly these kinds of structural failures. Beyond legal risk, poor accessibility can reduce conversions from the roughly 1-in-4 adults who have a disability, and Google's crawlers also use semantic structure to understand page content, so clean markup supports SEO as a secondary benefit.

See the complete Listitem guide for every platform and the full background.

Not sure if your Adobe Commerce (Magento) store has this?

Run a free SEOLZ scan — we’ll find listitem and every other issue across your whole site.

Scan my site free

Fix listitem on another platform