We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

aria-prohibited-attr

Web validation

ARIA attributes must not be used on elements or roles that prohibit them.

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.

HTML
<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.

HTML
<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.

HTML
<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-attr ensures roles only include permitted attributes.
  • aria-prohibited-attr ensures 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

StandardSuccess CriterionReference
WCAG 2.24.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 5499.4.1.2 Name, Role, ValueSame as the WCAG text.

Personas impacted by this issue

Learn More