Follow-up to SOLVED: WooCommerce Variation swatches a11y regression in 2.3.3. That report had two issues; 2.3.11 fixed the input inside the <ul> (thanks), but the second one is still there, so the axe list rule still fails. Old thread is closed, hence a new one.
Environment: Bricks 2.3.12, WooCommerce 10.9.4, WordPress 7.1. Clean install, no custom code.
html
<ul class="bricks-variation-swatches bricks-swatch-label">
<li data-value="0-5-kg" role="button" aria-pressed="false" tabindex="0" aria-label="0.5 kg">0.5 kg</li>
…
</ul>
Lighthouse still reports “Lists do not contain only <li> elements…”. axe’s only-listitems check resolves each child’s role, not just its tag — role="button" overrides the implicit listitem role, so the list counts as containing non-list content. Removing the input was necessary but not sufficient.
