aria-prohibited-attr
Web validation
ARIA attributes are only recognized when the element’s implicit or explicit role supports them. Applying a prohibited attribute such as aria-label on an element with role="none" or role="paragraph" means assistive technologies will ignore or misinterpret the information, leaving screen-reader and braille users without vital context.
Pass Patterns
aria-label on a native interactive element
The button role supports naming, so aria-label is allowed.
<button aria-label="Close">
✕
</button>Fail Patterns
Using a role of none with aria-label
aria-label is prohibited on elements with a role attribute of none.
<div role="none" aria-label="Decorative frame">
<!-- Decorative content -->
</div>Using a role of paragraph with aria-label
aria-label is prohibited on elements with a role attribute of paragraph.
<div role="paragraph" aria-label="some text">
Some other text
</div>ACT Rules
Try It Yourself
A testing walkthrough is not included here because testing tools often surface ARIA attributes regardless of their validity, which can give a false sense of correctness. Despite being "visible" to the technology, these attributes remain problematic as they are unexpected on unsupported elements and often lead to a confusing or broken experience.
FAQ
How does this issue relate to 4.1.2 Name, role, value?
Prohibited ARIA attributes prevent an element’s name, role, or value from being programmatically determined, directly failing SC 4.1.2.
Why is this issue marked as Serious?
Missing or ignored names and values cause assistive technologies to skip critical information, confusing users and breaking component interaction across screen readers, braille displays, and voice control software.
What is the difference between aria-allowed-attr and aria-prohibited-attr?
aria-allowed-attr checks whether a role uses only the ARIA attributes explicitly permitted for that role.
aria-prohibited-attr flags attributes that a role explicitly forbids.
Both rules address misuse of ARIA, but from opposite directions:
aria-allowed-attrensures roles only include permitted attributes.aria-prohibited-attrensures roles do not include attributes that the specification forbids.
An attribute can violate one rule or both, depending on how the ARIA specification defines valid and invalid mappings for the role.
Standards and Regulations
| Standard | Success Criterion | Reference |
|---|---|---|
| WCAG 2.2 | 4.1.2 Name, Role, Value (A) | For all user interface components, the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to assistive technologies. |
| EN 301 549 | 9.4.1.2 Name, Role, Value | Same as the WCAG text. |
Personas impacted by this issue
Learn More
- ARIA 1.3: Prohibited States and Properties
- HTML Semantics and Accessibility
- Relationships Between ARIA Roles and Attributes