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

New rule - a data table must have an accessible name #4697

Closed
Wildebrew opened this issue Feb 4, 2025 · 1 comment
Closed

New rule - a data table must have an accessible name #4697

Wildebrew opened this issue Feb 4, 2025 · 1 comment
Labels
feat New feature or enhancement ungroomed Ticket needs a maintainer to prioritize and label

Comments

@Wildebrew
Copy link

Product

axe-core

Feature Description

The ARIA spec requires that a table has an accessible name.
You can see this in the documentation for the table role (in the role definition section) The characteristics table for the table role has "accessible name required: true".
You can also see this in section 5.2.8.

I have half a mind to file an issue against the ARIA spec asking if this requirement makes sense, given that the HTML <table> element does not have to have a <caption>.

But, given that this requirement is listed in at least two separate locations in the ARIA spec, it looks pretty clear that the ARIA working group has discussed this and made a decision.

If it is so I would expect Axe Core based tools to flag a violation for missing accessible name for any data table, that is

  • Any <table> element that does not have role="presentation" or role="none"
  • Any <table> element that passes the data table guess (it has one or more header cells.

I would personally suggest moderate severity to start with, especially if the webpage contains a single table, it could be serious if the page has 3 or more tables.

If this has been discussed here before and a decision was made not to create an Axe Core rule for this I'd be happy to tag that discussion in an issue against the ARIA spec to get further clarification.

@Wildebrew Wildebrew added feat New feature or enhancement ungroomed Ticket needs a maintainer to prioritize and label labels Feb 4, 2025
@WilcoFiers
Copy link
Contributor

Hey @Wildebrew good to hear from you again. We've had an issue open on this for quite a while: #2603 I'm going to close this as a duplicate. I'm not too sure I agree with ARIA that this actually should be a requirement. It's certainly a good idea for large table to have an accessible name, but for small tables I'm less convinced that's a strictly necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or enhancement ungroomed Ticket needs a maintainer to prioritize and label
Projects
None yet
Development

No branches or pull requests

2 participants