Deepcrawl is now Lumar. Read more.
DeepcrawlはLumarになりました。 詳細はこちら

Invalid ARIA role value (WCAG 2.0 Level A Issue)

Post cover image showing clasped hands - representing website accessibility projects
 

What does this accessibility issue mean?

To comply with WCAG Level A rules, check that all elements using ARIA roles have valid roles defined.

The role attribute is used to define the role of an element, and this test ensures that the role is properly defined and valid according to the WAI-ARIA specifications.

Issue details

Lumar can help you find & resolve this website accessibility issue — & many others — on your own site. Speak to our team to get started with the platform.

Get a Lumar demo

 

Example HTML violation: Invalid ARIA role value (WCAG 2.0 Level A Issue)

<!DOCTYPE html>
<html lang='en' class='no-js'>
  <head>
    <meta charset='utf-8'>
    <title>Online Store</title>
  </head>
  <body>
    <nav role='navigations'>
      <!-- Invalid ARIA role -->
      <ul>
        <li>
          <a href='#'>Home</a>
        </li>
        <li>
          <a href='#'>Products</a>
        </li>
        <li>
          <a href='#'>Contact</a>
        </li>
      </ul>
    </nav>
  </body>
</html>

Explanation of Violation

The violation occurs in the <nav> element where the ARIA role attribute is assigned a value of 'navigations'. This is not a valid ARIA role value according to the ARIA roles category, which may lead to incorrect or nonsensical user interface information presented to users of assistive technology.

Corrected HTML Code is below

 

How to fix "Invalid ARIA role value (WCAG 2.0 Level A Issue)" issue

<!DOCTYPE html>
<html lang='en' class='no-js'>
  <head>
    <meta charset='utf-8'>
    <title>Online Store</title>
  </head>
  <body>
    <nav role='navigation'>
      <!-- Correct ARIA role -->
      <ul>
        <li>
          <a href='#'>Home</a>
        </li>
        <li>
          <a href='#'>Products</a>
        </li>
        <li>
          <a href='#'>Contact</a>
        </li>
      </ul>
    </nav>
  </body>
</html>

In the corrected HTML Code, the correct ARIA role value 'navigation' is used for the <nav> element.

This provides the correct semantic information about the navigation section to assistive technology.

 
Digital Accessibility + SEO + Website Health

Build better online experiences — explore the full Lumar platform