Elements use prohibited ARIA attributes

How to fix the aria-prohibited-attr accessibility rule. ARIA.

The message you saw

Lighthouse and PageSpeed Insights
Elements use prohibited ARIA attributes
axe-core, axe DevTools and this checker
Elements must only use permitted ARIA attributes (rule aria-prohibited-attr)

Lighthouse runs axe-core inside it, so both are the same check, and the fix below works whichever tool showed you the message.

What it means

A few roles are not allowed to have a name given by aria-label or aria-labelledby. They include the generic role of a plain <div> or <span>, text roles such as paragraph, code, strong, emphasis, mark, subscript and superscript, and presentation/none. This message means one of these elements has a label it isn’t allowed to have.

Screen readers handle such labels inconsistently. Many ignore them, so the label you wrote is never heard. Some read the label instead of the text inside, so the content is replaced by something else.

Who is affected

aria-label or aria-labelledby is on an element that can't be named (a plain div, span or paragraph), so screen readers ignore it or read it instead of the content.

Screen-reader users either miss information you thought you had provided (a chart described only by aria-label on a <div>) or hear the label instead of the real content.

How to find it

  1. Run the checker on the page: the report names the element and the attribute.
  2. Search your code for aria-label on <div>, <span> and <p> that have no role. Labels on icon wrappers, price tags, status text and chart containers are common.

How to fix it

  1. If the text you put in aria-label is extra information, make it real text: visible, or visually hidden with a CSS class so screen readers still read it.
  2. If the element really is something else, give it that role. A chart drawn with CSS is an image: role="img" with aria-label is allowed and works.
  3. If the element is interactive, use the proper element (<button>, <a href>), which can carry a label.
  4. If the label duplicates the visible text, remove it.

Examples

A chart drawn with CSS

Before

<div class="bar-chart" aria-label="Sales rose 20% in 2025"></div>

After

<div class="bar-chart" role="img" aria-label="Sales rose 20% in 2025"></div>

Extra words for a price

Before

<span aria-label="Price: 5 dollars">$5</span>

After

<span><span class="visually-hidden">Price: </span>$5</span>

Common mistakes

WCAG success criteria

When this rule fails, the page fails:

Check your fix

Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools. Scan again after your change: when the rule no longer appears under the problems, the fix worked.

An automated pass means this rule found nothing wrong. It doesn’t prove the page is accessible: some of what WCAG asks for needs a person to check, and the report’s manual checklist lists those steps.

Related fix guides

More detail