WCAG A/AA requirement Priority: Moderate
Accessibility attributes are used on the wrong elements
Some elements carry accessibility attributes that are not allowed for their type.
This text was translated automatically and has not been reviewed by a native speaker yet.
Why it matters to your customers
Screen readers may ignore the attribute or announce the element in a confusing way, so the intended information, such as a state or label, does not arrive.
Who is affected
- screen reader users
How to fix it
Use only attributes the element's role supports, for example aria-checked only on checkboxes, radios and switches. Either remove the attribute or give the element the correct role. Prefer native HTML.
On Shopify
Usually theme or app code. Find the element in the theme's Liquid and JavaScript files and remove or correct the attribute.
On Shoptet (CZ)
Usually template code or add-ons. Report it to Shoptet or a partner.
On PrestaShop
Usually theme or module templates. Fix it in the .tpl or JavaScript files.
On WooCommerce
Usually theme, page-builder or plugin code. Fix it in a child theme or report it to the plugin author.
Fix it with AI
Copy this prompt into ChatGPT, Claude or Copilot and add the HTML of the element. Check the answer before you publish it.
You are an experienced web developer and accessibility specialist. Fix this accessibility problem on my website so that it meets WCAG 2.2 level AA. Website: [https://…] ## Problem: Accessibility attributes are used on the wrong elements WCAG 2.2 4.1.2 (A) Some elements carry accessibility attributes that are not allowed for their type. **How to fix:** Use only attributes the element's role supports, for example aria-checked only on checkboxes, radios and switches. Either remove the attribute or give the element the correct role. Prefer native HTML. ## Elements found by the automated check [Paste the HTML of the element here, or the selector from the Pandus report] ## Requirements - Change only what is needed; keep the design and how the site works. - Do not add accessibility overlays or widgets; fix the code or the content. - Show the corrected code and say in which template or file it goes. - Explain how to check the fix with the keyboard and a screen reader.
Standards
| Standard | Clause |
|---|---|
| WCAG 2.2 | 4.1.2 (A) Name, Role, Value |
| WCAG 2.1 | 4.1.2 (A) Name, Role, Value |
| WCAG 2.0 | 4.1.2 (A) Name, Role, Value |
| EN 301 549 4.1.1 | 9.4.1.2 |
| EN 301 549 3.2.1 | 9.4.1.2 |
| Section 508 2017 | E205.4 |
| ДСТУ EN 301 549 2022 | 9.4.1.2 |
Automated check: axe-core rule aria-allowed-attr.
dequeuniversity.com, github.com, www.w3.org
Read next
WCAG success criterion
Guides and tools
Help articles
-
How to read a report and what to fix first
What each part of the report means and how to turn it into a to-do list for your developer.
Related checks
-
A label or value stands outside its list
WCAG 1.3.1 A
-
Some table headers do not describe any data
WCAG 1.3.1 A
-
Some form fields have more than one label
WCAG 3.3.2 A
-
Some videos or sounds start playing with audio by themselves
WCAG 1.4.2 A