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

Is this really a WCAG defect: All <th> elements and elements with role=columnheader/rowheader must have data cells they describe #741

Closed
melaniephilipp opened this issue Feb 22, 2018 · 6 comments
Assignees
Labels
fix Bug fixes rules Issue or false result from an axe-core rule

Comments

@melaniephilipp
Copy link

melaniephilipp commented Feb 22, 2018

Could you please clarify how the table used in the example on this page: https://dequeuniversity.com/rules/axe/3.0/th-has-data-cells is in violation of WCAG? The table is constructed properly - every <th> has a column of corresponding <td>s. How does having empty data cells in the last column make this table a failure of WCAG? And, at a Serious level as my testing indicates that the table is accessibility supported across many platforms. There are certainly many legitimate use cases for having a table that has a column of empty data cells.
Thank you!

@WilcoFiers
Copy link
Contributor

Hey Melanie. Thanks for the report. I think you are entirely correct. I would suggest that we make the following changes:

  1. Allow headers associated with empty cells - while still flagging empty with no associated cells
  2. Flag headers in tables without data cells as "needs review", since the table could simply not be populated

What do you think?

@WilcoFiers WilcoFiers added the fix Bug fixes label Feb 23, 2018
@dequelabs dequelabs deleted a comment Mar 5, 2018
@dequelabs dequelabs deleted a comment Mar 5, 2018
@WilcoFiers WilcoFiers added the rules Issue or false result from an axe-core rule label Oct 18, 2018
@WilcoFiers WilcoFiers added this to the Axe-core 3.4 milestone Jun 7, 2019
@straker
Copy link
Contributor

straker commented Jun 18, 2019

After looking into this, it looks like the code correctly marks the "Bad Example" as needs review. It seems like the example should be updated to show a missing column rather than an empty column.

@jeankaplansky
Copy link
Contributor

Immediate change doesn't require specific documentation.

@chandana7393
Copy link

@straker Can you please specify the expected behaviour.

@straker
Copy link
Contributor

straker commented Jul 15, 2019

@chandana7393 The rule should return needs review only if a table heading row or table heading column has 0 cells (so is missing the entire row/column after the header). Otherwise it should always pass.

<table>
  <tr><th>Header</th></tr>
  <tr></tr>
</table>

@chandana7393
Copy link

chandana7393 commented Jul 16, 2019

Tested, working as expected.
Attest_table_empty
Axe_table_empty
axe_coconut_table_empty
Tested Environment:
Attest - 2.5.1.19317v
Axe - 3.8.1.19317v
Axe-coconut - 3.8.1.19604v
Chrome - 75v
Firefox - 68v
OS - Windows 10 64 bit.

@WilcoFiers WilcoFiers removed this from the Axe-core 3.4 milestone Sep 30, 2019
mrtnvh pushed a commit to mrtnvh/axe-core that referenced this issue Nov 24, 2023
…s#741)

* docs: update docs to use named import and create example.js

* remove

* Update packages/playwright/example.js

Co-authored-by: Gabe <41127686+Zidious@users.noreply.github.com>

* Update packages/playwright/example.js

Co-authored-by: Gabe <41127686+Zidious@users.noreply.github.com>

* readme updates

---------

Co-authored-by: Gabe <41127686+Zidious@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes rules Issue or false result from an axe-core rule
Projects
None yet
Development

No branches or pull requests

5 participants