WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: [EXT] can you make a native <select>/<option> honor the LANG attribute?

for

From: Jared Smith
Date: Dec 17, 2020 2:52PM


I can confirm the same behavior on VoiceOver with Chrome and Safari, and VoiceOver mobile. VoiceOver does not change language when exploring the options, even if the proper <option lang> value is defined. It reads them all in English.

Interestingly, VoiceOver mobile does (sometimes) properly read non-Latin words in their proper language, but this is because it's guessing based on the script of the characters, not because the lang attribute is being considered.

We just today wrapped up some fairly extensive screen reader testing of lang attribute support and found this inconsistency to be fairly standard. Several screen readers do not support inline language changes ("language of parts") for inline elements (<span>, etc.), but does for block-level elements (<p>, <div>, etc.). It seems <option> aligns with the former. A list of links, or perhaps a custom menu (such as on UPS) is probably a better alternative until these deficiencies are addressed.

WebAIM will very soon be publishing a new article with guidance on using lang. I'll share our test cases and testing results at that time.

Thanks,

Jared