Skip to content

Report headers attribute referencing other <td> elements as unsupported #3987

@WilcoFiers

Description

@WilcoFiers

The headers attribute on td elements should not be allowed to reference other td elements by the td-headers-attr rule.

The following should fail this rule:

<table>
  <tr>
    <td id="hdr1">Hello</td>
    <td id="hdr2">World</td>
  </tr>
  <tr>
    <td headers="hdr1">A</td>
    <td headers="hdr2">1</td>
  </tr> 
  <tr>
    <td headers="hdr1">B</td>
    <td headers="hdr2">Wor2ld</td>
  </tr>
</table>

While HTML doesn't explicitly prohibit this, this does not seem to work with any screen reader running against a Chromium browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featNew feature or enhancementgood first issueFor first-time contributorsrulesIssue or false result from an axe-core rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions