Reported by mquinn on 2014-08-15 13:50
When the content of an HTML element with an aria-live attribute set to either polite or assertive changes, the content is not read using the correct pronunciation specified in the element's lang tag. However, subsequently tabbing to that element produces the correct pronunciation.
Attachment index.html added by mquinn on 2014-08-15 13:51
Description:
An example that allows the user to click a button,changing the content of an aria-live region with a lang attribute of 'es'. The demo also allows the user to tab to the region to demonstrate correct pronunciation.
Just adding a quick update that it appears that the pronunciation of aria-labels also does not respect the lang tag used for the element or page.
This is probably due to NVDA not respecting the lang tag in browse mode, but does in focus mode. Thoughts? CC @leonardder @michaelDCurran
cc: @jcsteh, @derekriemer do you have any suggestions regarding this one?
I've encountered this problem also and it happens on Mac with VoiceOver too.
Any combination of lang="fr" inside, outside or on the same element as aria-live="assertive" does not work. Am I missing something in the aria spec?
There's precious little documentation about how the lang attribute is supposed to work with live regions. I assume that the live region itself should get the attribute.
Naturally, if the page is in a single language, it ought to be enough to specify it on the html root, or perhaps the body and if the screen reader does not respect this (regardless of whether it has browse/focus mode), it is certainly a bug.
But what if the live region contains elements with text in multiple languages? Something like a chat log? This is not unthinkable - At work I often have chats where even though the main chat may be in English, certain individuals might routinely post in Danish, Norwegian or Swedish - which I and my colleagues can read and understand just fine. In such a case, the incoming message would need language metadata, and this would have to be inserted into a lang attribute for each new message in the log.
Somehow I doubt this is well-explored territory for US-based tech firms.
In case it's helpful, note that ARIA 1.2 (which will move to "Candidate Recommendation" status any day now) now specifies that aria-label is a "translatable" attribute. See https://www.w3.org/TR/wai-aria-1.2/#translatable-states-and-properties