Re: lang and aria attributes (Re: Hawaiian Diacritics)

APA's Spoken Presentation Task Force, which is working toward a
normative W3C specification for content authoring to support reliable
consistent TTS behavior across any and all user agents and operating
environments, has lately come to the conclusion that lang is inadequate
for driving TTS behavior. The problem statement is yet to be
written--but stay tuned. We expect a session on this during the upcoming
TPAC.

What's missing? lang doesn't allow specifying voice gender or age, and
we have use cases where that's important. It also doesn't comprehend
time, i.e. the fact that pronouncing Chaucer wouldn't follow the same
rules as pronouncing Shakespeare--or contemporary U.K. English.

We are coming to the conclusion that lang is adequate only to
orthography, but inadequate for spoken language.

More when we have it.

Best,

Janina

Jonathan Avila writes:
> It's been my experience that screen readers don't work as expected with attributes like title and placeholder on elements with lang attributes set.  The situations vary with particular elements, but this is an area of weakness for screen readers.
> 
> Jonathan
> 
> -----Original Message-----
> From: Christophe Strobbe <strobbe@hdm-stuttgart.de> 
> Sent: Monday, May 9, 2022 7:48 AM
> To: w3c-wai-ig@w3.org
> Subject: lang and aria attributes (Re: Hawaiian Diacritics)
> 
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
> 
> 
> Hi,
> 
> According to the HTML5 spec,
> 
> "The lang attribute (in no namespace) specifies the primary language for the element's contents and for any of the element's attributes that contain text."
> (Source: https://html.spec.whatwg.org/multipage/dom.html#the-lang-and-xml:lang-attributes )
> 
> The lang attribute worked the same way in HTML 4.01:
> 
> "This attribute specifies the base language of an element's attribute values and text content."
> (Source: https://www.w3.org/TR/html401/struct/dirlang.html#adef-lang )
> 
> By my reading, if a screen reader speaks the values of aria-* attributes in a different language than that defined in the lang attribute, this should be considered a bug. (If the element has no lang attribute, you obviously need to look for an ancestor with a lang attribute.)
> 
> Validators reject a few ISO 639-3 tags for languages that have no ISO 639-1 tag, but "haw" seems to work fine. I have a test page with over 500 language tags at https://cstrobbe.gitlab.io/languagelearning/misc/languagetags.html (warning: 313.5 KiB and content in many different scripts).
> 
> Best regards,
> 
> Christophe Strobbe
> 
> 
> > On 07 May 2022 at 02:13 "Patrick H. Lauke" <redux@splintered.co.uk> wrote:
> >
> >
> > On 06/05/2022 21:32, David Woolley wrote:
> >
> > > In the example, your tool output is missing a lang attribute.  I think:
> > >
> > > <span aria-label=”Hawaii”>Hawaiʻi</span>
> >
> > Worth noting that the aria-label theoretically overrides anything 
> > inside the span, so the lang attribute would be pointless. Also worth 
> > noting that an aria-label on a generic span is generally (depending on 
> > browser/AT combination) not supported, as a generic span is not a an 
> > element that has a label/name.
> > https://developer.paciellogroup.com/blog/2017/07/short-note-on-aria-la
> > bel-aria-labelledby-and-aria-describedby/
> >
> > P--
> > Patrick H. Lauke
> >
> > https://www.splintered.co.uk/ | https://github.com/patrickhlauke 
> > https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
> > twitter: @patrick_h_lauke | skype: patrick_h_lauke
> >
> 

-- 

Janina Sajka (she/her/hers)
https://linkedin.com/in/jsajka

The World Wide Web Consortium (W3C), Web Accessibility Initiative (WAI)
Co-Chair, Accessible Platform Architectures http://www.w3.org/wai/apa

Received on Monday, 9 May 2022 21:32:14 UTC