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

Include all required ARIA attributes for custom widgets in Shopify

Elements using custom ARIA roles (e.g. `checkbox`, `combobox`, `slider`) must include all mandatory attributes.

What's wrong

Omitting required attributes like `aria-checked` on `role="checkbox"` causes assistive technologies to malfunction.

Who it affects

Screen reader users cannot tell whether a filter is selected or what range a slider represents.

How to fix on Shopify

Ensure custom variant swatches or filter toggles initialize all required ARIA state attributes.

Code example

Problematic Code
LIQUID
<div role="checkbox" class="filter-checkbox">
  In stock
</div>
Recommended Accessible Code
LIQUID
<div
  role="checkbox"
  aria-checked="{% if filter_value.active %}true{% else %}false{% endif %}"
  tabindex="0"
  class="filter-checkbox"
>
  {{ filter_value.label }}
</div>

How to check your fix

Validate custom controls with axe DevTools to confirm all required ARIA attributes are present and dynamically updated.

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)