WCAG A/AA requirement Priority: Moderate
Some labels are placed where screen readers ignore them
Some elements use accessibility attributes that are not allowed for their type, most often aria-label on a plain <div> or <span> with no role.
This text was translated automatically and has not been reviewed by a native speaker yet.
Why it matters to your customers
Screen readers often skip these labels. A star rating written as aria-label="4.5 out of 5", a "Sale" icon or a stock badge may then say nothing or something different to what sighted customers see.
Who is affected
- screen reader users
- blind customers
How to fix it
Do not put aria-label or aria-labelledby on elements without a suitable role (such as plain div, span, p or elements with role="presentation"). Instead, put the information in text, for example a visually hidden <span>, or give the element an appropriate role such as role="img" for a star rating made of icons.
On Shopify
Usually review, badge or icon code in the theme or apps. Change the Liquid snippet to use visually hidden text or role="img"; report app widgets to the developer.
On Shoptet (CZ)
Usually ratings, badges or icons in the template or add-ons. Report it to Shoptet or a Shoptet partner.
On PrestaShop
Usually ratings, labels or icons in the theme or modules. Fix it in the .tpl templates or overridden module templates.
On WooCommerce
Usually star ratings, badges or icons in the theme, page builder or review plugins. Fix it in a child theme or report it to the plugin author.
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-prohibited-attr.
dequeuniversity.com, github.com, www.w3.org
Related checks
-
Some labels are placed where screen readers ignore them
WCAG 4.1.2 A
-
Clickable elements are nested inside each other
WCAG 4.1.2 A
-
A table's title is written inside a table cell
WCAG 1.3.1 A
-
Clickable areas of an image have no description
WCAG 2.4.4 A