w3c / html-aam

HTML Accessibility API Mappings - new spec updates should be made in https://github.com/w3c/aria/tree/main/html-aam
https://w3c.github.io/html-aam/
Other
100 stars 27 forks source link

td, th naming doesn't align with ARIA #543

Open scottaohara opened 5 months ago

scottaohara commented 5 months ago

ARIA says that cells and column/rowheaders can get name from content. But HTML AAM doesn't list this.

TBH, i'm failing to understand a good use case for allowing a cell to be named from author (more so for a standard table - slightly less so for a grid). I say this because, at least from my quick testing, unless the cell is properly keyboard focused - the author provided name (aria-label) is not always relayed to screen readers. and in cases where it is, if it includes the visible content of the cell, it can result in redundant announcements of the information (first as the name/part of the name, and again as the cell content).

Even for grids though, it can be strange to have a cell that has a name of X when focused, but have different content of Y when you actually navigate 'into' the cell. Anecdotally speaking, I've heard negative responses to this sort of behavior, since it means a screen reader user has to be aware they need to interact with a grid in both application mode AND reader mode, to truly understand the content of the grid.

rahimabdi commented 5 months ago

The only scenarios I can think of:

scottaohara commented 5 months ago

some questions for your scenarios though

  1. what is 'requiring' that the blank cell be named? again, in my testing when navigating by table cells using table commands, the aria-label isn't even announced. maybe there's a misconception that this blank cell needs to be a columnheader? that's not true though - it could just be an empty cell, and now there's no columnheader that isn't conveying a name.
  2. i'd submit that there would need to be actual content in those cells, rather than just a use of color. Someone turns on a high contrast theme, or goes into reader mode, then that coloring is gone. An image (icon) could accompany this coloring, and be provided alternative text, without the need to use an aria-label (which again, wouldn't be announced if navigating using table commands)

i'm not responding with the above to flat out dismiss your scenarios. i am just trying to level set with where we are both coming from.

rahimabdi commented 5 months ago

Hi @scottaohara!

some questions for your scenarios though

  1. what is 'requiring' that the blank cell be named? again, in my testing when navigating by table cells using table commands, the aria-label isn't even announced. maybe there's a misconception that this blank cell needs to be a columnheader? that's not true though - it could just be an empty cell, and now there's no columnheader that isn't conveying a name.

Good point. Anecdotally, I've received feedback from screen reader users that have voiced concern about empty table header cells although I agree that making it a data cell alleviates this.

  1. i'd submit that there would need to be actual content in those cells, rather than just a use of color. Someone turns on a high contrast theme, or goes into reader mode, then that coloring is gone. An image (icon) could accompany this coloring, and be provided alternative text, without the need to use an aria-label (which again, wouldn't be announced if navigating using table commands)

👍🏾. The only other case I can think of is image content (or general non-text stuff) in a cell however, the image would be supplied with its own text alternative rather than one derived from the cell's label.

spectranaut commented 5 months ago

discuss with: https://github.com/w3c/aria/issues/2160

spectranaut commented 3 months ago

Discussed last week: https://www.w3.org/2024/06/20-aria-minutes#t08

spectranaut commented 1 month ago

@aardrian, I added you as assigned because in the meeting a few months ago it mentions you being interested in helping find a solution.

We have this on the TPAC agenda for now (as it has f2fcandidate from that same meeting) -- but I'm wonder if anyone wants to champion it/help it move forward in that context?

aardrian commented 1 week ago

Related items for my use later (from TPAC notes and somewhat related abbr):

There may be a separate AAM issue to file here:

Test page: https://codepen.io/aardrian/pen/QWebNmZ