# The “rowgroup” role is unnecessary for element “thead”.

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

The `<thead>` element is exposed with the ARIA role `rowgroup` by default, so `role="rowgroup"` on it only states its built-in role a second time.

Every HTML element maps to a default ARIA role, and the table sections share one: `<thead>`, `<tbody>` and `<tfoot>` are all row groups. Browsers already tell screen readers that the rows inside a `<thead>` form a group at the top of the table. An explicit `role="rowgroup"` changes nothing users can notice, which is why the validator reports it as a warning rather than an error.

You'll often see this in tables generated by page builders, table plugins or content copied from online editors, which tend to stamp a role onto every table part. The `rowgroup` role exists for tables made from generic elements such as `<div>`, where the markup gives assistive technology no clue about how the rows are grouped. A real `<thead>` already carries that meaning, so delete the attribute. While you're there, check the rest of the table. In a native `<table>`, a `role` on `<tr>`, `<th>` or `<td>` is reported as an error, so remove those in the same pass.

## Invalid example

```html
<table>
  <thead role="rowgroup">
    <tr>
      <th>Feature</th>
      <th>Included</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Backups</td>
      <td>Yes</td>
    </tr>
    <tr>
      <td>Priority support</td>
      <td>No</td>
    </tr>
  </tbody>
</table>
```

## Valid example

```html
<table>
  <thead>
    <tr>
      <th>Feature</th>
      <th>Included</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Backups</td>
      <td>Yes</td>
    </tr>
    <tr>
      <td>Priority support</td>
      <td>No</td>
    </tr>
  </tbody>
</table>
```
