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

th-has-data-cells fails on empty tables #2508

Closed
just-boris opened this issue Sep 8, 2020 · 3 comments
Closed

th-has-data-cells fails on empty tables #2508

just-boris opened this issue Sep 8, 2020 · 3 comments
Labels
commons Issues in the common code (lib/commons) fix Bug fixes
Milestone

Comments

@just-boris
Copy link

I ran my pages using axe checker and it seems to fail on empty tables:

<table>
  <thead>
    <tr>
      <th>Product</th>
      <th>Amount</th>
      <th>Price</th>
    </tr>
  </tbody>
  <tbody>
    <tr>
      <td colspan="3">No available products to display</td>
    </tr>
  </thead>
</table>

Live demo https://jsbin.com/pewali

Expectation: axe handles this table and does not report incomplete checks

Actual: axe stumbles on this table and reports incomplete check

Motivation: Incomplete checks still require attention and should not give false-negatives


axe-core version: 3.5.5
chrome-extension: 4.5.3
@WilcoFiers
Copy link
Contributor

Yup, you seem to have found a bug! Thank you for reporting. We'll definitely fix this.

@WilcoFiers WilcoFiers added commons Issues in the common code (lib/commons) fix Bug fixes labels Sep 9, 2020
@straker
Copy link
Contributor

straker commented Sep 9, 2020

Note on the bug: It seems our getHeaders and getCellPosition functions do not take into account row/col-span. So when we look at the cells for the 2nd and 3rd headers and ask what the header of those cells are, it only returns the first header and not the other 2, so we fail saying that the cell points to a different header.

@padmavemulapati
Copy link

Verified with the latest axe-core(dated 22/10/2020) - 4.0.2 version
No incomplete results found for the table' rowspan and colspan
image

Also verified on 3.5.4 version where it is showing up incomplete results. (So fix is verified on 4.0.2 version)
Uploading image.png…

@straker straker closed this as completed Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commons Issues in the common code (lib/commons) fix Bug fixes
Projects
None yet
Development

No branches or pull requests

4 participants