# The “table” role is unnecessary for element “table”.

> Canonical HTML version: https://rocketvalidator.com/html-validation/the-table-role-is-unnecessary-for-element-table
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The `role="table"` attribute on a `<table>` element is redundant because the `<table>` element already has an implicit ARIA role of `table`.

Every HTML element carries a default ARIA role defined by the HTML specification. The `<table>` element's built-in role is `table`, so adding `role="table"` explicitly tells assistive technologies something they already know. The W3C validator flags this as unnecessary markup.

This applies to many other elements too. A `<nav>` element has an implicit role of `navigation`, a `<button>` has a role of `button`, and so on. Adding these explicit roles creates noise in the code without any accessibility benefit.

## Incorrect example

```html
<table role="table">
  <tr>
    <th>Name</th>
    <th>Age</th>
  </tr>
  <tr>
    <td>Alice</td>
    <td>30</td>
  </tr>
</table>
```

## Fixed example

```html
<table>
  <tr>
    <th>Name</th>
    <th>Age</th>
  </tr>
  <tr>
    <td>Alice</td>
    <td>30</td>
  </tr>
</table>
```
