Skip to content

Empty table headers are flagged as a failure of WCAG 1.3.1 #3404

Closed
@fstrr

Description

Product: axe Extension

Expectation:
I don't think an empty table header (e.g. <th></th>) is a failure of WCAG 1.3.1 Info And Relationships, which is what Axe flags and tags this code as. It's definitely best practice to have text in a table heading, but I don't think this is a WCAG failure. 1.3.1 says:

"Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text."

If a header cell is marked up as a header cell, is in the same same row as all the other header cells, and styled differently from non-header cells, I'd argue that the presentational information, structure, and relationships are programmatically available. There's no text, so there's nothing to present visually or programmatically.

I'd expect to see this flagged as Best Practice rather than a WCAG conformance issue.

Actual:
This example is flagged in Axe with an issue tag of "wcag131":

<table>
  <tr>
   <th>First Name</th>
   <th>Last Name</th>
   <th>Email Address</th>
   <th></th>
  </tr>
  <tr>
    <td>Sarah</td>
    <td>Smith</td>
    <td>sarah.smith@example.com</td>
    <td><button type="button">Edit</button><button type="button">Delete</button></td>
 </tr>
</table>

Motivation:
I don't believe that this is a WCAG failure, so would like to see this moved to a best practice recommendation.


axe-core version: 4.4.1
Browser: Chrome 98

Metadata

Assignees

No one assigned

    Labels

    prA pr has been created for the issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions