Aria allowed attr

Moderate effort

Found on 10% of audited stores.

Remove or replace any ARIA attributes that are not permitted on an element's assigned role so that assistive technologies can correctly interpret the element.

What it is

ARIA (Accessible Rich Internet Applications) attributes are special HTML properties — like `aria-checked`, `aria-expanded`, or `aria-haspopup` — that tell screen readers and other assistive technologies what a page element is and how it behaves. Every ARIA role (e.g. `button`, `listbox`, `img`) has a defined set of attributes it is allowed to carry. When an element has an ARIA attribute that its role does not support — for example, placing `aria-checked` on a plain `<div role="heading">` — the browser and screen reader can't make sense of the conflicting signals. The `aria-allowed-attr` rule flags exactly these mismatches.

Why it matters

Screen reader users — who rely entirely on ARIA signals to understand and navigate your store — receive garbled or misleading information when roles and attributes conflict, making buttons, menus, forms, and product options unusable for them. In many countries (the US ADA, EU EAA, UK PSBAR, and others) online stores must meet WCAG 2.1 AA, and ARIA mismatches are a clear, documentable failure of Success Criterion 4.1.2 (Name, Role, Value) — creating real legal exposure. Beyond legal risk, inaccessible checkout flows and product pages directly reduce conversions from the roughly 15–20 % of shoppers who use assistive technology. Fixing these mismatches is also a trust signal: accessibility audits and Core Web Vitals tooling surface these errors, and a clean bill of health supports your brand reputation.

How to fix it

  1. Open browser DevTools (F12) on the page with the flagged element, find the element in the Elements panel, and note its `role` attribute (explicit or implicit) and every `aria-*` attribute present.
  2. Cross-reference the element's role against the WAI-ARIA specification's list of allowed attributes for that role (e.g. `role="heading"` does not support `aria-checked`); identify which `aria-*` attributes are invalid for that role.
  3. If the attribute is simply wrong for the role, remove it. If the behaviour the attribute was meant to convey is genuinely needed, either change the element's role to one that supports the attribute, or restructure the markup using a semantically correct HTML element (e.g. a native `<button>` instead of a `<div role='button'>`).
  4. Prefer native HTML semantics over ARIA wherever possible — a real `<button>`, `<input type='checkbox'>`, or `<select>` carries the correct implicit role and allowed attributes automatically, with no risk of mismatch.
  5. After making the change, re-run an automated accessibility checker (e.g. axe DevTools browser extension, WAVE, or Lighthouse) to confirm the `aria-allowed-attr` violation no longer appears on that element.
  6. Test the corrected element with an actual screen reader (NVDA + Firefox on Windows, VoiceOver + Safari on macOS/iOS, or TalkBack on Android) to verify the announced role, name, and state are accurate and meaningful.
<!-- WRONG: aria-checked is not allowed on role="heading" -->
<div role="heading" aria-level="2" aria-checked="true">Sale Items</div>

<!-- CORRECT: remove the disallowed attribute -->
<div role="heading" aria-level="2">Sale Items</div>

<!-- BETTER: use a native HTML element (implicit correct role + no mismatch risk) -->
<h2>Sale Items</h2>

<!-- WRONG: aria-expanded is not allowed on role="img" -->
<div role="img" aria-label="Product photo" aria-expanded="false"></div>

<!-- CORRECT: aria-expanded belongs on interactive roles like button/combobox -->
<button type="button" aria-expanded="false" aria-controls="filter-panel">
  Filter products
</button>

Fix it on your platform

Pick your platform for the exact steps.

How to fix aria allowed attr on Shopify
  1. In your Shopify Admin go to Online Store → Themes → click the '…' menu next to your active theme → Edit code.
  2. Use the search box (top-left of the code editor) to search for the offending `aria-` attribute string (e.g. `aria-checked`) across all Liquid and snippet files.
  3. Open the relevant file (commonly a section file under Sections/, a snippet under Snippets/, or `theme.liquid` under Layout/).
  4. Locate the HTML element, inspect its `role` and all `aria-*` attributes, remove or replace the disallowed attribute as described in the generic steps, then save.
  5. If the ARIA mismatch originates inside a third-party app widget (e.g. a review carousel or product filter), contact the app developer — you cannot directly edit app-injected markup.
  6. Republish/preview the theme and re-test with axe DevTools or Lighthouse to confirm the error is gone.
How to fix aria allowed attr on WooCommerce
  1. In your WordPress Admin go to Appearance → Theme File Editor (or use a code editor via FTP/SSH to the theme directory for safety).
  2. Search your active theme's template files (`single-product.php`, `cart.php`, page templates, and any block patterns) and your child theme's `functions.php` for the offending `aria-` attribute.
  3. Edit the relevant template or partial file, remove or correct the disallowed ARIA attribute, and save.
  4. If the violation comes from a plugin (e.g. a slider, tabs, or filter plugin), check the plugin's settings for an option to disable or customise its markup; if none exists, report it to the plugin author or replace the plugin.
  5. Use the axe DevTools browser extension or WP Accessibility Helper plugin to re-scan the page after saving.
  6. Clear any caching plugin (e.g. WP Rocket, W3 Total Cache) and re-test on the live site.
How to fix aria allowed attr on BigCommerce
  1. In your BigCommerce Control Panel go to Storefront → My Themes → click Customize on your active theme → then Edit Theme Files (available on Developer-tier or via the Stencil CLI).
  2. In the Stencil CLI or the online file editor, search template files (`.html` Handlebars partials under `templates/components/` and `templates/pages/`) for the offending `aria-` attribute.
  3. Open the relevant partial, remove or correct the disallowed ARIA attribute, and save.
  4. If using Page Builder widgets, go to Storefront → Page Builder, select the widget containing the element, and inspect its HTML/Custom HTML block for the offending attribute.
  5. Push the updated theme (`stencil push`) or apply changes in the online editor, then re-test with axe DevTools.
How to fix aria allowed attr on Wix
  1. Open your site in the Wix Editor; click on the element flagged with the ARIA mismatch.
  2. Open the element's Settings or Accessibility panel (the wheelchair icon in the inspector sidebar) — Wix exposes limited ARIA fields here; remove or correct any custom ARIA attribute value entered in these fields.
  3. If the element is inside a Wix App (e.g. Wix Stores product page, Wix Bookings widget), the ARIA markup is controlled by Wix — submit a bug report via Wix Support referencing WCAG 4.1.2 and the specific `aria-allowed-attr` violation.
  4. For custom HTML elements added via the Wix HTML iframe widget (Add → Embed → Custom Code), click the widget → Settings → edit the raw HTML to remove the disallowed attribute directly.
  5. Use the Wix Accessibility Wizard (Add-ons → Accessibility Wizard) to re-scan after changes.
How to fix aria allowed attr on Squarespace
  1. In the Squarespace Pages panel, navigate to the page containing the flagged element and open the Page Settings → Advanced → Page Header Code Injection or Block-level Code Block if the ARIA attribute was added via a custom code block.
  2. If the element is part of a built-in Squarespace block (e.g. a gallery, accordion, or button), the markup is generated by Squarespace itself — submit a bug report via Squarespace Support referencing WCAG 4.1.2.
  3. If the attribute was added via Website → Pages → (page) → Edit → a Code Block or via Settings → Advanced → Code Injection, open that code block, locate the offending `aria-*` attribute, remove or correct it, and save.
  4. For site-wide custom code, go to Website → Pages → Website Tools → Code Injection (Header/Footer) and search there.
  5. Re-test with axe DevTools after publishing.
How to fix aria allowed attr on Webflow
  1. Open your project in the Webflow Designer; select the element flagged by the scanner in the Navigator panel.
  2. In the right-hand Element Settings panel (the gear icon), scroll to the Custom Attributes section — this is where ARIA attributes are added manually.
  3. Identify the disallowed `aria-*` attribute, remove it by clicking the '×' next to it, or change the element's role attribute to one that supports the ARIA attribute you need.
  4. If the element's role itself is wrong (set in the same Custom Attributes section), update it to the correct role and adjust the accompanying ARIA attributes to match.
  5. Publish the site and re-test with the axe DevTools browser extension.
How to fix aria allowed attr on Adobe Commerce (Magento)
  1. SSH into your server (or use your IDE connected to the server) and locate your active theme under `app/design/frontend/<Vendor>/<Theme>/`.
  2. Use `grep -r 'aria-<attribute-name>' app/design/` to find the template file (.phtml or .html for Knockout/UI components) containing the offending attribute.
  3. Open the file, correct or remove the disallowed ARIA attribute, and save. If the file does not exist in your custom theme yet, copy it from `vendor/magento/module-<ModuleName>/view/frontend/templates/` into your theme at the matching path first (template override pattern).
  4. If the attribute originates in a JavaScript/Knockout UI component, find the corresponding `.html` knockout template under `app/design/frontend/<Vendor>/<Theme>/<Module_Name>/web/template/` and apply the same override approach.
  5. Run `bin/magento setup:static-content:deploy` and `bin/magento cache:flush`, then re-test with axe DevTools.

Does your site have this issue?

Run a free SEOLZ audit to find aria allowed attr — and every other issue — across your whole site in minutes.

Scan my site free

Frequently asked questions

What is Aria allowed attr?

ARIA (Accessible Rich Internet Applications) attributes are special HTML properties — like `aria-checked`, `aria-expanded`, or `aria-haspopup` — that tell screen readers and other assistive technologies what a page element is and how it behaves. Every ARIA role (e.g. `button`, `listbox`, `img`) has a defined set of attributes it is allowed to carry. When an element has an ARIA attribute that its role does not support — for example, placing `aria-checked` on a plain `<div role="heading">` — the browser and screen reader can't make sense of the conflicting signals. The `aria-allowed-attr` rule flags exactly these mismatches.

Why does aria allowed attr matter?

Screen reader users — who rely entirely on ARIA signals to understand and navigate your store — receive garbled or misleading information when roles and attributes conflict, making buttons, menus, forms, and product options unusable for them. In many countries (the US ADA, EU EAA, UK PSBAR, and others) online stores must meet WCAG 2.1 AA, and ARIA mismatches are a clear, documentable failure of Success Criterion 4.1.2 (Name, Role, Value) — creating real legal exposure. Beyond legal risk, inaccessible checkout flows and product pages directly reduce conversions from the roughly 15–20 % of shoppers who use assistive technology. Fixing these mismatches is also a trust signal: accessibility audits and Core Web Vitals tooling surface these errors, and a clean bill of health supports your brand reputation.

How do I fix aria allowed attr?

Remove or replace any ARIA attributes that are not permitted on an element's assigned role so that assistive technologies can correctly interpret the element.

Authoritative references

Related Accessibility (WCAG) issues