Which WCAG criterion this fails
- Does not meet 1.3.1 Info and Relationships (Level A)
How to fix it on WooCommerce
Everything below is done from Appearance > Theme File Editor, or your child theme over SFTP. Take a copy of the theme before editing.
- For each element in the finding, add the required parent role, or remove the child role and use native markup.
- role="listitem" needs an ancestor with role="list"; role="option" needs role="listbox"; role="tab" needs role="tablist"; role="menuitem" needs role="menu" or role="menubar"; role="gridcell" needs role="row".
- A wrapper element between parent and child breaks the relationship. Give the intervening wrapper role="presentation", or move it outside.
- On a store this is usually a custom variant picker or a predictive-search dropdown where role="option" was added to the results without role="listbox" on the container.
- Plain <ul>/<li> is safer than role="list"/role="listitem" — the native elements cannot be separated by a stray wrapper.
Where this usually lives
AJAX search plugin markup, variation swatch plugins, and custom nav walkers in functions.php
Paths given for Storefront, Astra, Flatsome and other WooCommerce themes. A heavily customised theme may differ; the CSS selector in your scan report points at the exact element.
Code
<!-- Wrong: the wrapper severs listbox from option -->
<ul role="listbox">
<div class="results">
<li role="option">Wool Runner</li>
</div>
</ul>
<!-- Right -->
<ul role="listbox" aria-label="Search results">
<li role="option" id="r1">Wool Runner</li>
<li role="option" id="r2">Tree Dasher</li>
</ul>How to confirm it is fixed
Re-run the scan. This rule should drop out of the findings entirely. If the instance count falls but does not reach zero, the same defect exists in another template — product cards and quick-view modals are the usual second home for it.
Effort: medium. Rule id: aria-required-parent (axe-core).