Aria prohibited attr
Moderate effortFound on 12% of audited stores.
Remove or replace ARIA attributes that are explicitly prohibited on an element's assigned role, ensuring every ARIA attribute used is valid for its context.
What it is
ARIA (Accessible Rich Internet Applications) is a set of special HTML attributes — like `aria-label`, `aria-hidden`, or `aria-required` — that help screen readers and assistive technologies understand what elements on your page do. However, not every ARIA attribute is allowed on every type of element. The WAI-ARIA specification defines a strict list of which attributes are permitted ("allowed") and which are forbidden ("prohibited") for each element role. For example, adding `aria-label` to a plain `<div role="presentation">` or using `aria-checked` on a link breaks the rules because those combinations are explicitly prohibited. The `aria-prohibited-attr` rule flags exactly these mismatches.
Why it matters
When prohibited ARIA attributes are present, screen readers — used by millions of shoppers with visual or motor impairments — may behave unpredictably: ignoring the element entirely, announcing it incorrectly, or causing navigation to break. This directly harms the shopping experience for customers who rely on assistive technology, reducing conversions and potentially exposing your store to accessibility-related legal complaints (including ADA and WCAG 2.1 AA lawsuits, which are increasingly common in ecommerce). Search engines also parse ARIA to understand page structure, so garbled semantics can subtly weaken your technical SEO. Fixing these violations brings your store into WCAG 2.1 / 2.2 Success Criterion 4.1.2 compliance and signals a quality, well-coded site.
How to fix it
- Identify the offending element by reviewing your accessibility scan results — note the element's HTML tag, its `role` attribute (explicit or implicit), and the specific prohibited ARIA attribute flagged.
- Look up which ARIA attributes are allowed for that role using the WAI-ARIA specification or the Deque/axe rule reference. For example, elements with `role='presentation'` or `role='none'` must not carry naming attributes like `aria-label` or `aria-labelledby`.
- Decide on the correct fix: either (a) remove the prohibited attribute entirely if it serves no purpose, (b) replace the element's role with one that does permit the attribute, or (c) restructure the markup so the attribute is moved to a child or sibling element where it is allowed.
- Make the change in your theme's HTML/template files or in the CMS component that renders the element. If the attribute is injected by a plugin, app, or third-party widget, update or replace that component.
- Re-run your accessibility scanner (e.g., axe DevTools browser extension) on the affected page to confirm the `aria-prohibited-attr` violation is resolved and no new violations have been introduced.
- Repeat for all other instances of this issue across your store — check product pages, cart, checkout, navigation menus, and modal dialogs, as these areas commonly contain ARIA mismatches.
<!-- ❌ WRONG: aria-label is prohibited on role="presentation" -->
<div role="presentation" aria-label="Product image">
<img src="product.jpg" alt="Blue running shoes">
</div>
<!-- ✅ CORRECT: Remove the prohibited attribute; let the img's alt text do the work -->
<div role="presentation">
<img src="product.jpg" alt="Blue running shoes">
</div>
<!-- ❌ WRONG: aria-checked is prohibited on role="link" -->
<a href="/wishlist" role="link" aria-checked="true">Add to Wishlist</a>
<!-- ✅ CORRECT: Use aria-pressed (allowed on buttons) or restructure -->
<button aria-pressed="true">Add to Wishlist</button>Fix it on your platform
Pick your platform for the exact steps.
How to fix aria prohibited attr on Shopify
- Go to Online Store → Themes → click the three-dot menu next to your active theme → Edit code.
- Use the search box (top of the file list) to search for the prohibited attribute name (e.g., `aria-label`, `aria-checked`) across all Liquid template files (.liquid).
- Open the offending file (common culprits: `sections/header.liquid`, `snippets/product-card.liquid`, `snippets/cart-drawer.liquid`, `layout/theme.liquid`).
- Locate the HTML element flagged by your scanner, then remove or replace the prohibited ARIA attribute following the generic steps above.
- If the attribute comes from a Shopify App (e.g., a reviews widget or chat bubble), contact the app developer or switch to an accessible alternative app.
- Click Save, then re-test with the axe DevTools browser extension on your live storefront.
How to fix aria prohibited attr on WooCommerce
- In your WordPress admin, go to Appearance → Theme File Editor (or use a child theme via FTP/SFTP).
- Search your active (child) theme's template files for the prohibited attribute — check `header.php`, `functions.php`, page templates, and any WooCommerce template overrides in `/woocommerce/` within your theme folder.
- Edit the relevant template file to remove or correct the prohibited ARIA attribute.
- If the issue originates from a plugin (e.g., a slider, popup, or mega-menu plugin), check that plugin's settings for an accessibility mode, or update to the latest version, or contact the plugin author.
- Use the axe DevTools browser extension to verify the fix on the frontend.
How to fix aria prohibited attr on BigCommerce
- Go to Storefront → Themes → click Customize on your active theme → then use Advanced → Edit Theme Files (or download the theme via Theme Editor → Download).
- Search the downloaded theme's HTML/Handlebars templates (.html files in `/templates/`) for the prohibited attribute name.
- Edit the relevant template (common areas: `templates/components/header.html`, `templates/components/products/card.html`, `templates/layout/base.html`).
- Remove or correct the prohibited ARIA attribute, then upload the modified theme and apply it.
- If the violation comes from a BigCommerce widget or a third-party script injected via Script Manager (Storefront → Script Manager), update or remove the offending script.
- Verify with axe DevTools on your live store.
How to fix aria prohibited attr on Wix
- Open the Wix Editor for your site. Wix controls most ARIA output automatically, so first check whether the issue comes from a custom HTML element: look for any 'HTML iframe' or 'Embed Code' blocks on the page.
- Click on the suspect HTML/Embed widget → click 'Enter Code' → inspect the markup for the prohibited ARIA attribute and remove or correct it.
- For Wix-native elements (buttons, menus, images), you cannot directly edit their ARIA output in the standard editor — enable Wix Studio (or use Wix Studio directly) where you get greater HTML/CSS control.
- In Wix Studio, select the element → open the Properties & Events panel or Dev Mode → locate any custom ARIA properties set in the properties panel or in Velo (JavaScript) code, and correct them.
- Re-test using the axe DevTools browser extension on your published site.
How to fix aria prohibited attr on Squarespace
- In your Squarespace admin, go to Website → Pages and open the page containing the flagged element.
- If the element is inside a Code Block or Embed Block, click that block to edit it and correct the prohibited ARIA attribute in the raw HTML.
- For site-wide injected code, go to Settings → Advanced → Code Injection — check the Header and Footer injection areas for any scripts or HTML that add the prohibited attribute.
- If the issue is in Squarespace's own generated markup (e.g., navigation or gallery components), use the CSS Editor (Design → Custom CSS) only where layout can be adjusted, or submit a support request to Squarespace since their core templates are not directly editable.
- Verify with axe DevTools on your published site.
How to fix aria prohibited attr on Webflow
- Open your project in the Webflow Designer. Select the element flagged by your scanner.
- In the right-hand panel, open the Element Settings tab (the gear icon). Scroll to 'Custom Attributes' — this is where manually added ARIA attributes live.
- Locate the prohibited ARIA attribute in the custom attributes list and either delete it or replace the element's role with one that allows the attribute.
- If the element's role itself needs to change, update the `role` custom attribute value to a role that is compatible with the ARIA attribute you want to keep.
- For elements rendered by Webflow CMS collections, open the Collection Template page in the Designer and apply the same fix to the bound element.
- Publish the site and verify with the axe DevTools browser extension.
How to fix aria prohibited attr on Adobe Commerce (Magento)
- SSH into your server (or use your IDE) and locate the relevant PHTML or HTML template file in your custom theme under `app/design/frontend/<Vendor>/<Theme>/`.
- Search the theme directory for the prohibited attribute string: `grep -r 'aria-label\|aria-checked' app/design/frontend/<Vendor>/<Theme>/` (adjust the attribute name as needed).
- Open the relevant `.phtml` or `.html` (Knockout/Magento UI component) template and remove or correct the prohibited ARIA attribute.
- If the attribute comes from a third-party module, override its template in your custom theme rather than editing the module directly.
- Run `bin/magento cache:flush` and `bin/magento setup:static-content:deploy` to push the changes to the frontend.
- Verify the fix with the axe DevTools browser extension on the affected page.
Does your site have this issue?
Run a free SEOLZ audit to find aria prohibited attr — and every other issue — across your whole site in minutes.
Scan my site freeFrequently asked questions
What is Aria prohibited attr?
ARIA (Accessible Rich Internet Applications) is a set of special HTML attributes — like `aria-label`, `aria-hidden`, or `aria-required` — that help screen readers and assistive technologies understand what elements on your page do. However, not every ARIA attribute is allowed on every type of element. The WAI-ARIA specification defines a strict list of which attributes are permitted ("allowed") and which are forbidden ("prohibited") for each element role. For example, adding `aria-label` to a plain `<div role="presentation">` or using `aria-checked` on a link breaks the rules because those combinations are explicitly prohibited. The `aria-prohibited-attr` rule flags exactly these mismatches.
Why does aria prohibited attr matter?
When prohibited ARIA attributes are present, screen readers — used by millions of shoppers with visual or motor impairments — may behave unpredictably: ignoring the element entirely, announcing it incorrectly, or causing navigation to break. This directly harms the shopping experience for customers who rely on assistive technology, reducing conversions and potentially exposing your store to accessibility-related legal complaints (including ADA and WCAG 2.1 AA lawsuits, which are increasingly common in ecommerce). Search engines also parse ARIA to understand page structure, so garbled semantics can subtly weaken your technical SEO. Fixing these violations brings your store into WCAG 2.1 / 2.2 Success Criterion 4.1.2 compliance and signals a quality, well-coded site.
How do I fix aria prohibited attr?
Remove or replace ARIA attributes that are explicitly prohibited on an element's assigned role, ensuring every ARIA attribute used is valid for its context.
Authoritative references
- How to fix this specific rule — Deque/axe (rule reference)
- WCAG 2 overview — W3C WAI
- ARIA basics — MDN