-
Notifications
You must be signed in to change notification settings - Fork 125
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
Recommendations for using the lang attribute with live regions? #1346
Comments
There's some guidance on live regions being developed for APG in this PR w3c/aria-practices#1027
Ok, I'm intrigued. What have you heard? [Edit: I guess you must mean CSS Speech?] |
JAWS also has problems with correct language output in live regions: FreedomScientific/standards-support#8 and w3c/aria-practices#1163 |
I'm not sure if the problem is more general and therefore not limited to live regions. In my experience the language and the language change is only output correctly when reading linearly with the virtual cursor. But as soon as the text is not read directly with the virtual cursor, but only a reference to the text is used as plain text for output, the language change within it and often also the language markup of the text itself is lost. This occurs, for example, with the following ARIA and HTML attributes/elements:
I think that the specification should be more exact here, so that then afterwards bugs can be opened at the AT manufacturers (see: w3c/accname#56) |
@carmacleod the This is really good, although it's not required by the spec, and support is likely to be uneven, so it would be convenient if this was better known, and better documented. I have already made sure it is mentioned on the MDN page for |
Oh, right. Forgot about output. :) |
WICG/aom#128 seems tangentially related. |
Safari/VoiceOver does not honour Below is the code I used. If you're going to test, make sure that the speech 'voice' for the language(s) in question has been downloaded!
|
Thanks, @brennanyoung I tested JAWS and NVDA in Chrome and FF (had to switch back to eSpeak NG synthesizer for NVDA to change langs).
Just data for now. Still have to discuss the larger issue of live regions, and the more general issue that @JAWS-test mentioned about referenced text. |
@JAWS-test 100% agree that we could do with more clarity around which language should be spoken in all sorts of situations. Lets keep this issue only about the live region language issues (as that seems potentially solvable in the ARIA spec itself) and leave the larger set of issues to w3c/accname#56 and any child issues that might get logged from there. |
But if you have a language change within |
Just ran into this article today, produced this year. A truly dismal report on https://uxdesign.cc/the-troubled-state-of-screen-readers-in-multilingual-situations-f6a9da4ecdf3 |
There are a number of related issues to this one which we should try to tackle to better support i18n - anyone interested in working on these? |
There appear to be some issues with screen readers (notably NVDA and VoiceOver) not respecting the
lang
attribute in live regions. I can't help feeling that this may be partly because of lack of explicit guidance.Naturally, if the page is in a single language, it ought to be enough to specify it on the
html
root, or perhaps thebody
and if the screen reader does not respect this in a live region (regardless of whether it has browse/focus mode), it is IMO an AT bug. Unfortunately, I can't point to anything in the spec which would nail this down, and which I could include in a bug report to the AT vendors.There's precious little documentation about how the
lang
attribute is supposed to work with live regions. I would expect that addinglang
to the live region would be enough in many cases (although as mentioned, some ATs are failing here).But more conceptually, what if the live region - such as a multi-lingual chat log - contains elements with text in multiple languages?
Would it be valuable to add some notes of clarification to the spec for
aria-live
, explaining how it should work with WCAG SC 3.1.2 (Language of Parts). Is there a better place for such guidance to appear?Given that live regions may be implemented without aria, perhaps it would fit better on the Understanding doc for SC 3.1.2?
The text was updated successfully, but these errors were encountered: