Skip to content

Recommendations for using the lang attribute with live regions? #1346

@brennanyoung

Description

@brennanyoung

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 the body 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 adding lang 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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions