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

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

A `<tbody>` element already has the ARIA role `rowgroup`, so adding `role="rowgroup"` to it repeats what browsers and screen readers already know.

HTML gives each element a default ARIA role. Inside a `<table>`, a `<tbody>` is exposed to assistive technology as a group of rows with no extra markup, and `<thead>` and `<tfoot>` get the same `rowgroup` role. Writing `role="rowgroup"` by hand changes nothing for users and makes the markup harder to read.

This usually comes from tables pasted from online word processors or built by table plugins, which put an ARIA role on every part of the table. The `rowgroup` role is meant for tables built from generic elements such as `<div>`, where nothing else tells a screen reader how the rows are grouped. A native `<tbody>` doesn't need it, so remove the attribute. If the same table also has `role="row"` on its `<tr>` elements or roles on its cells, remove those as well.

## Invalid example

```html
<table>
  <thead>
    <tr>
      <th>Plan</th>
      <th>Price</th>
    </tr>
  </thead>
  <tbody role="rowgroup">
    <tr>
      <td>Basic</td>
      <td>$10</td>
    </tr>
    <tr>
      <td>Pro</td>
      <td>$25</td>
    </tr>
  </tbody>
</table>
```

## Valid example

```html
<table>
  <thead>
    <tr>
      <th>Plan</th>
      <th>Price</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Basic</td>
      <td>$10</td>
    </tr>
    <tr>
      <td>Pro</td>
      <td>$25</td>
    </tr>
  </tbody>
</table>
```
