Skip to main content
HTML Validation

The “cell” role is unnecessary for element “td”.

About This HTML Issue

A <td> in a data table already has the implicit ARIA role cell, so writing role="cell" on it gives screen readers nothing they don't already get from the HTML.

Browsers map table markup to ARIA roles on their own. The <table> becomes a table, each <tr> a row, each <th> a column or row header, and each <td> a cell. Screen readers use that structure to announce the matching headers as someone moves from cell to cell. An explicit role="cell" leaves all of this unchanged and adds an attribute to every cell in the table.

In most tables you'll see an error next to this warning. When the <table> has no role attribute, or has role="table", role="grid" or role="treegrid", its <td> cells can't have a role attribute at all. Removing role="cell" fixes both messages.

The attribute usually comes from table plugins or from markup copied out of online word processors, which put a role on every row and cell. The cell role exists for tables built from generic elements such as <div>, where nothing in the HTML marks an element as a cell. A native <td> doesn't need it, so delete the attribute. If the same table has roles on its rows or header cells, remove those as well.

Invalid example

<table>
  <thead>
    <tr>
      <th>Region</th>
      <th>Delivery time</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td role="cell">Europe</td>
      <td role="cell">3 to 5 days</td>
    </tr>
    <tr>
      <td role="cell">North America</td>
      <td role="cell">5 to 7 days</td>
    </tr>
  </tbody>
</table>

Valid example

<table>
  <thead>
    <tr>
      <th>Region</th>
      <th>Delivery time</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Europe</td>
      <td>3 to 5 days</td>
    </tr>
    <tr>
      <td>North America</td>
      <td>5 to 7 days</td>
    </tr>
  </tbody>
</table>

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
€5 / week

1K Weekly

1,000 monthly checks. Cancel anytime.

Get 1K Weekly →

Join teams across 40+ countries