Skip to content
ShopifyRule: aria-allowed-attr•Reviewed Oct 2026

Use only permitted ARIA attributes on HTML elements in Shopify

ARIA attributes must only be used on elements whose role supports them.

What's wrong

Using attributes like `aria-expanded` on `role="link"` or elements that do not support expansion creates conflicting semantics.

Who it affects

Screen readers may ignore the attribute or report incorrect widget behavior to the user.

How to fix on Shopify

Use native semantic elements like `<button>` instead of `<a>` for expandable menus and accordions.

Code example

Problematic Code
LIQUID
<a href="#" aria-expanded="false" class="accordion-trigger">Shipping Info</a>
Recommended Accessible Code
LIQUID
<button type="button" aria-expanded="false" aria-controls="ShippingPanel" class="accordion-trigger">
  Shipping Info
</button>

How to check your fix

Run axe DevTools and verify that no 'aria-allowed-attr' violations are reported for interactive components.

Check if your site has this issue

Scan any public store page free against WCAG 2.2 AA in 30 seconds.

Your session has ended

Sign in again to carry on. Anything you typed on this page is kept.

Signed in another way? Use another method (opens a new tab)