# Bad value “nav” for attribute “role” on element “nav”.

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-nav-for-attribute-role-on-element-nav
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

`nav` is the name of an HTML element, not an ARIA role, so `role="nav"` on a `<nav>` element is an invalid value.

The `role` attribute accepts only role names defined in WAI-ARIA. The landmark role for a block of navigation links is `navigation`, spelled out in full, and shortened forms are not recognized. Browsers and assistive technologies ignore a role token they do not know and treat the element as if it had no `role` attribute.

The `<nav>` element already has the `navigation` role built in, so it needs no `role` attribute at all. Changing the value to `role="navigation"` clears this error, but the validator then warns that the role is unnecessary on `nav`. Remove the attribute instead. When a page has more than one `<nav>`, give each one an `aria-label` such as "Main" or "Footer" so screen reader users can tell the landmarks apart.

## Invalid example

```html
<nav role="nav">
  <ul>
    <li><a href="/">Home</a></li>
    <li><a href="/about">About</a></li>
  </ul>
</nav>
```

## Valid example

```html
<nav>
  <ul>
    <li><a href="/">Home</a></li>
    <li><a href="/about">About</a></li>
  </ul>
</nav>
```
