aria-describedby, aria-labelledby, aria-label not spoken on a td or th element #5567

Closed
artopaavola opened this Issue Dec 2, 2015 · 7 comments

Projects

None yet

3 participants

@artopaavola

NVDA (version 2015.4) does not speak aria-label, aria-description, aria-labelledby or aria-describedby on a table cell element (td or th). Tested in Windows 7 with Firefox 42, Internet Explorer 11 and Google Chrome 47.

Test page: http://codepen.io/artopaavola/pen/rOEbyR

@jcsteh jcsteh added the wontfix label Dec 2, 2015
@jcsteh
Contributor
jcsteh commented Dec 2, 2015

aria-label(ledby) don't replace the content here because doing so would inappropriately cause all actual content to be overridden. This is expected for links and buttons, but not for uninteractive elements like div, span, td, th, etc.

NVDA treats descriptions (aria-describedby) as secondary content, rather like tooltips for sighted users; i.e. you can query them on demand, but they shouldn't necessarily interrupt the flow of normal reading. You can press NVDA+numpad5 to explicitly query information about the current object, including the description.

@jcsteh jcsteh closed this Dec 2, 2015
@artopaavola

The aria-label(ledby) examples on my codepen would make no sense with that kind of data :) It was made just for demo purposes. In my opinion there are use cases where it would make sense to replace the contents of a cell with aria-label(ledby). I updated the codepen with a better example (see the th elements).

The Working Draft of ARIA in HTML specification quite clearly states that global states and properties (including aria-label, aria-labelledby, aria-description and aria-describedby) are allowed on any html element: http://www.w3.org/TR/html-aria/#allowed-aria-roles-states-and-properties

Thanks for the explanation on aria-describedby! Apple's VoiceOver reads the hints automatically and somehow I expected that NVDA would do that, too. Especially because NVDA reads aria-descriptions on interactive elements like text input fields automatically.

@jcsteh
Contributor
jcsteh commented Dec 2, 2015

In my opinion there are use cases where it would make sense to replace the contents of a cell with aria-label(ledby).

There might be, but this opens up a huge can of worms. As a simple example, if we replace the content with aria-label in all cases, you'd lose the entire content of labelled landmarks. This is something everyone seems to forget when they simply expect aria-label to replace the content in all cases.

The Working Draft of ARIA in HTML specification quite clearly states that global states and properties (including aria-label, aria-labelledby, aria-description and aria-describedby) are allowed on any html element

It states that they're allowed. It even states how that should be exposed via accessibility APIs. It doesn't say this should replace the content as far as document reading is concerned. See above for why that would be a terrible idea in all cases.

Thanks for the explanation on aria-describedby! Apple's VoiceOver reads the hints automatically and somehow I expected that NVDA would do that, too. Especially because NVDA reads aria-descriptions on interactive elements like text input fields automatically.

It reads them when you focus an element, since that's an on-demand action. It also reads them when you query an object, since that, too, is an on-demand action. If you just cursor to one, hwoever, it does not read them in that case.

@jcsteh
Contributor
jcsteh commented Dec 2, 2015

Btw, as far as I can see, aria-description doesn't exist, even in ARIA 1.1. There's only aria-describedby.

@artopaavola

I wasn't suggesting that aria-label(ledby) should replace the contents in all cases - I was only talking about table cells. Probably even with the th element's case in the example it shouldn't replace the content but rather append it. When aria-label or aria-labelledby is used in a th element, and the user queries an object in a cell (td) in the table with NVDA+numpad5, NVDA reads the th element's aria-label or aria-labelledby. Not the content of the th element as it does when user arrows to a cell.

Anyways, thank you for your responses! Seems that using aria-label(ledby) or aria-describedby with a th or td element works well with OS X VoiceOver but unfortunately not so well with NVDA.

(You're absolutely right about aria-description not being part of the spec. I have no idea why I thought otherwise. I vaguely remember that there were plans to introduce it in ARIA 2.0, so maybe that confused me when I wrote the demo. I removed aria-description from the codepen so that doesn't confuse anyone if they stumble upon this conversation later.)

@artopaavola artopaavola changed the title from aria-describedby, aria-description, aria-labelledby, aria-label not spoken on a td or th element to aria-describedby, aria-labelledby, aria-label not spoken on a td or th element Dec 2, 2015
@ottopoika

@jcsteh I'm curious how will the user know when the element has additional information?

@jcsteh
Contributor
jcsteh commented Dec 3, 2015
@afercia afercia referenced this issue in Yoast/wordpress-seo May 10, 2016
Closed

List table accessibility improvements #4507

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment