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 the accessible name for td/th/tr elements intentionally meant to be calculated by looking at the ancestor table element? #335

Closed
sideshowbarker opened this issue May 31, 2021 · 1 comment

Comments

@sideshowbarker
Copy link

https://w3c.github.io/html-aam/#other-tabular-data-elements says that says that for “tr, td, th Elements Accessible Name Computation”, the step that implementations must start with is:

If the table element has an aria-label or an aria-labelledby attribute the accessible name is to be calculated using the algorithm defined in Accessible Name and Description: Computation and API Mappings 1.1.

I notice it says “If the table element” — not “If the element”. Is it intentionally worded that way, or is that a mistake in the spec which needs to be fixed?

If it’s not a mistake but is instead intentional, that would seem to mean that implementations must essentially ignore whatever aria-label attribute a td, th, or tr element might have, and instead look back up the tree and use whatever aria-label attribute the ancestor table element has. Right?

whatwg/encoding#261 and whatwg/encoding#260 are a related issue and PR that are currently blocked on getting clarification about this.

@scottaohara
Copy link
Member

@sideshowbarker removed the use of "table" there as either that was a copy/paste error, or it was being used in the general sense, like "tr, td and th are all 'table elements'". Either way, it wasn't clear and now has been updated.

That said, while using aria-label on these elements is valid and is meant to be respected when determining the name of the elements by browsers, as Steve noted in his html5accessibility post, support for aria-label with AT is rather spotty.

For instance with this table NVDA with Firefox and Chromium ignore the aria-label when navigating the list. So none of the coloring of the table will be accessible for people using this browser/AT combo.

With VoiceOver, on macOS (but not iOS) the aria-label is respected but that makes all cells initially announce as the aria-label value (e.g., "Two bytes"), requiring a user to navigate into the cell to determine what the actual value presented is.

tldr; these tables are valid, but the legend information is either not going to be announced, or it is but it will create an extra step for AT users to hear the actual content of the table cell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants