Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Accessibility] Empty table headers should use <td> instead of <th> #2599

Closed
afgomez opened this issue Dec 6, 2019 · 1 comment
Closed

Comments

@afgomez
Copy link

afgomez commented Dec 6, 2019

As part of my work for elastic/kibana#37539 I saw that EuiBasicTable sometimes renders empty table headers, for example, in headers for row expanders. The WAVE tool considers this an error, and guidelines to fix it.

If the table cell is a header, provide text within the cell that describes the column or row. If the cell is not a header or must remain empty (such as the top-left cell in a data table), make the cell a rather than a .

How to reproduce

  1. Install the WAVE browser extension
  2. Go to https://elastic.github.io/eui/#/tabular-content/tables
  3. Run the tool. The errors appear

Screenshot 2019-12-06 at 14 52 34

Suggested solution

When the component knows that a table header will be empty because the column is used for non-content (i.e. row expanders), use a <td> instead.

@cchaos
Copy link
Contributor

cchaos commented Dec 6, 2019

Haha, thanks @afgomez Yes we also have an existing ticket for this one as well #840. We are in the middle of an a11y push for some components (slow-going, but going) and we've got this on our meta list #2262. I'm mainly closing this one since we don't like to have duplicates and we also agree with your solution.

@cchaos cchaos closed this as completed Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants