Skip to main content

ARIA & keyboard

ARIA attribute is not allowed here

WCAG 2.2 success criterion 4.1.2 Name, Role, Value (Level A)

WCAG 2.2
4.1.2 Name, Role, Value
Level
A
Default severity
Needs review
Available in
Free

Updated for Lumtera 1.3.0 and Lumtera Pro 1.2.0.

Why does it matter?

WCAG 4.1.2 asks that a control's name, role and state reach assistive technology; WAI-ARIA does not allow this attribute on this kind of element, so many screen readers ignore it. Fine if the element's visible text already says the same thing.

Who it affects: Screen reader and keyboard users, who depend on ARIA and focus order being correct to understand and operate the page.

What does Lumtera flag?

An ARIA attribute on an element whose role does not allow it. For review: it is fine if the visible text already says the same thing.

Check ID aria-attr-not-allowed — use it to filter the content report or with wp lumtera issues --rule.

How do I fix it in WordPress?

Remove the attribute, or give the element a role that allows it. To name an icon, use role="img" with aria-label, or visually hidden text. For a state, make sure the element has the right role, for example role="switch" for aria-checked.

Example

Flagged
<span aria-label="Rated 4 out of 5">★★★★</span>
Fixed
<span role="img" aria-label="Rated 4 out of 5">★★★★</span>

How do I check the fix?

  1. Update the post. The issue disappears from the Lumtera Accessibility sidebar on the next check, and from the site report on the next scan.
  2. Press Tab from the top of the page. Focus should move in reading order and never land on something invisible or silent.

Find this issue across your whole site

Lumtera runs this check in the block editor sidebar as you write, in the Elementor panel, in Review mode on the live page, and across the whole site in the content report and with wp lumtera scan. You can change its severity or turn it off in Lumtera → Settings.

All checks

Start with the free plugin today

All 88 content checks and 38 whole-page checks, fixes you approve with undo, and the site report — free, with no account and no page limits.