WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Lang attributes not being respected by VoiceOver in select options?

for

Number of posts in this thread: 6 (In chronological order)

From: Alex Gonzalez
Date: Wed, Apr 20 2022 4:34PM
Subject: Lang attributes not being respected by VoiceOver in select options?
No previous message | Next message →

Hello,

I ran into an issue where lang attributes are not being respected by
VoiceOver when used on <option> elements inside of a <select> element.

An example of what I mean can be found at the following link:
https://a11ysupport.io/tests/html/html_option_element_with_lang.html

You'll notice when using VoiceOver the screen reader does not switch
pronunciation correctly based on which language it is reading even though
the lang attributes are properly set. It seems to read pages where the lang
attribute is set on the <html> element just fine however.

I was wondering if anyone knows of a work around or fix for this issue?

--
Alex Gonzalez (he/him) Software Engineer
Accessibility Advocate codeforamerica.org

From: glen walker
Date: Wed, Apr 20 2022 5:14PM
Subject: Re: Lang attributes not being respected by VoiceOver in select options?
← Previous message | Next message →

Hmm, interesting. I have the languages installed in my Voiceover settings
but none of them are used *except* for Chinese. I *do* hear the last
option in the select announced in Chinese. Not sure why just that one is
honored.

But I hear the same ignoring of the language with the option element with
JAWS and NVDA too, but all the languages are ignored, including Chinese.

I tried setting the language on the <select> element as well as the <label>
element. The label itself could be read in another language but when I
displayed the dropdown list, it switched back to English.

I'm not aware of a workaround. Just confirming your results, sorry.

From: jp Jamous
Date: Wed, Apr 20 2022 5:25PM
Subject: Re: Lang attributes not being respected by VoiceOver in select options?
← Previous message | Next message →

I have experienced certain behaviors with other components in the past. Have you tried adding the language to each <option> instead of the <select>? I would also recommend pressing Insert + spacebar followed by z, to load the JAWS default settings. That tends to help. Not sure why with my own personal settings, JAWS does not always switch the synthesizer. I typically don't change my settings from the default ones, except to readability preferences that do not get impacted by HTML. Yet, if I load the default settings, I always hear the change in synthesizers. It is worth trying that.


From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of glen walker
Sent: Wednesday, April 20, 2022 6:15 PM
To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = >
Subject: Re: [WebAIM] Lang attributes not being respected by VoiceOver in select options?

Hmm, interesting. I have the languages installed in my Voiceover settings but none of them are used *except* for Chinese. I *do* hear the last option in the select announced in Chinese. Not sure why j
External ( = EMAIL ADDRESS REMOVED = <mailto: = EMAIL ADDRESS REMOVED = >)
INKY is learning...<https://protection.inkyphishfence.com/report?id=bmV0b3JnZnQxMDM2OTU1NC9qcEBqZXBlbHN5LmNvbS8zZDMzNDE5NDk3YTFmM2NkMzliMTM2ZDhkMDBjM2NiNS8xNjUwNDk2NTEyLjM5#keyÌb77326ed2dc7e59ac09e1890e240ff> Report This Email<https://protection.inkyphishfence.com/report?id=bmV0b3JnZnQxMDM2OTU1NC9qcEBqZXBlbHN5LmNvbS8zZDMzNDE5NDk3YTFmM2NkMzliMTM2ZDhkMDBjM2NiNS8xNjUwNDk2NTEyLjM5#keyÌb77326ed2dc7e59ac09e1890e240ff> FAQ<https://www.inky.com/banner-faq> GoDaddy Advanced Email Security, Powered by INKY<https://www.inky.com/protection-by-inky>


Hmm, interesting. I have the languages installed in my Voiceover settings

but none of them are used *except* for Chinese. I *do* hear the last

option in the select announced in Chinese. Not sure why just that one is

honored.



But I hear the same ignoring of the language with the option element with

JAWS and NVDA too, but all the languages are ignored, including Chinese.



I tried setting the language on the <select> element as well as the <label>

element. The label itself could be read in another language but when I

displayed the dropdown list, it switched back to English.



I'm not aware of a workaround. Just confirming your results, sorry.

From: David Farough
Date: Thu, Apr 21 2022 7:03AM
Subject: Re: Lang attributes not being respected by VoiceOver in select options?
← Previous message | Next message →

I tried this as well.
It appears to me that the screen reader may be speaking the contents of the edit rather than the option being selected.
Perhaps the best approach might be to modify the lang setting for the edit to match the option being selected.

Not sure that this would work however. The screen reader might not recognize the change of language without a virtual screen refresh.

-----Original Message-----
From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of jp Jamous
Sent: Wednesday, April 20, 2022 7:26 PM
To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = >
Subject: Re: [WebAIM] Lang attributes not being respected by VoiceOver in select options?

I have experienced certain behaviors with other components in the past. Have you tried adding the language to each <option> instead of the <select>? I would also recommend pressing Insert + spacebar followed by z, to load the JAWS default settings. That tends to help. Not sure why with my own personal settings, JAWS does not always switch the synthesizer. I typically don't change my settings from the default ones, except to readability preferences that do not get impacted by HTML. Yet, if I load the default settings, I always hear the change in synthesizers. It is worth trying that.


From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of glen walker
Sent: Wednesday, April 20, 2022 6:15 PM
To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = >
Subject: Re: [WebAIM] Lang attributes not being respected by VoiceOver in select options?

Hmm, interesting. I have the languages installed in my Voiceover settings but none of them are used *except* for Chinese. I *do* hear the last option in the select announced in Chinese. Not sure why j External ( = EMAIL ADDRESS REMOVED = <mailto: = EMAIL ADDRESS REMOVED = >)
INKY is learning...<https://protection.inkyphishfence.com/report?id=bmV0b3JnZnQxMDM2OTU1NC9qcEBqZXBlbHN5LmNvbS8zZDMzNDE5NDk3YTFmM2NkMzliMTM2ZDhkMDBjM2NiNS8xNjUwNDk2NTEyLjM5#keyÌb77326ed2dc7e59ac09e1890e240ff> Report This Email<https://protection.inkyphishfence.com/report?id=bmV0b3JnZnQxMDM2OTU1NC9qcEBqZXBlbHN5LmNvbS8zZDMzNDE5NDk3YTFmM2NkMzliMTM2ZDhkMDBjM2NiNS8xNjUwNDk2NTEyLjM5#keyÌb77326ed2dc7e59ac09e1890e240ff> FAQ<https://www.inky.com/banner-faq> GoDaddy Advanced Email Security, Powered by INKY<https://www.inky.com/protection-by-inky>


Hmm, interesting. I have the languages installed in my Voiceover settings

but none of them are used *except* for Chinese. I *do* hear the last

option in the select announced in Chinese. Not sure why just that one is

honored.



But I hear the same ignoring of the language with the option element with

JAWS and NVDA too, but all the languages are ignored, including Chinese.



I tried setting the language on the <select> element as well as the <label>

element. The label itself could be read in another language but when I

displayed the dropdown list, it switched back to English.



I'm not aware of a workaround. Just confirming your results, sorry.

From: jp Jamous
Date: Thu, Apr 21 2022 7:10AM
Subject: Re: Lang attributes not being respected by VoiceOver in select options?
← Previous message | Next message →

Try adding a
<option>
<span lang=”en”>
English
</span>
</option>

Try this one before giving up. 😊




From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of David Farough
Sent: Thursday, April 21, 2022 8:04 AM
To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = >
Subject: Re: [WebAIM] Lang attributes not being respected by VoiceOver in select options?

I tried this as well. It appears to me that the screen reader may be speaking the contents of the edit rather than the option being selected. Perhaps the best approach might be to modify the lang sett
External ( = EMAIL ADDRESS REMOVED = <mailto: = EMAIL ADDRESS REMOVED = >)
INKY is learning...<https://protection.inkyphishfence.com/report?id=bmV0b3JnZnQxMDM2OTU1NC9qcEBqZXBlbHN5LmNvbS9kYmRiMThkNWI4OWYxNDRmNzM1ZmRmYjU2NDFmNDRjZS8xNjUwNTQ2MjM4LjU5#keyÃ3e87ab8cf5ff79cb42cd0bec4152c0> Report This Email<https://protection.inkyphishfence.com/report?id=bmV0b3JnZnQxMDM2OTU1NC9qcEBqZXBlbHN5LmNvbS9kYmRiMThkNWI4OWYxNDRmNzM1ZmRmYjU2NDFmNDRjZS8xNjUwNTQ2MjM4LjU5#keyÃ3e87ab8cf5ff79cb42cd0bec4152c0> FAQ<https://www.inky.com/banner-faq> GoDaddy Advanced Email Security, Powered by INKY<https://www.inky.com/protection-by-inky>


I tried this as well.

It appears to me that the screen reader may be speaking the contents of the edit rather than the option being selected.

Perhaps the best approach might be to modify the lang setting for the edit to match the option being selected.



Not sure that this would work however. The screen reader might not recognize the change of language without a virtual screen refresh.



-----Original Message-----

From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = <mailto: = EMAIL ADDRESS REMOVED = >> On Behalf Of jp Jamous

Sent: Wednesday, April 20, 2022 7:26 PM

To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = <mailto: = EMAIL ADDRESS REMOVED = >>

Subject: Re: [WebAIM] Lang attributes not being respected by VoiceOver in select options?



I have experienced certain behaviors with other components in the past. Have you tried adding the language to each <option> instead of the <select>? I would also recommend pressing Insert + spacebar followed by z, to load the JAWS default settings. That tends to help. Not sure why with my own personal settings, JAWS does not always switch the synthesizer. I typically don't change my settings from the default ones, except to readability preferences that do not get impacted by HTML. Yet, if I load the default settings, I always hear the change in synthesizers. It is worth trying that.





From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = <mailto: = EMAIL ADDRESS REMOVED = >> On Behalf Of glen walker

Sent: Wednesday, April 20, 2022 6:15 PM

To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = <mailto: = EMAIL ADDRESS REMOVED = >>

Subject: Re: [WebAIM] Lang attributes not being respected by VoiceOver in select options?



Hmm, interesting. I have the languages installed in my Voiceover settings but none of them are used *except* for Chinese. I *do* hear the last option in the select announced in Chinese. Not sure why j External ( = EMAIL ADDRESS REMOVED = <mailto: = EMAIL ADDRESS REMOVED = <mailto: = EMAIL ADDRESS REMOVED = %3cmailto: = EMAIL ADDRESS REMOVED = >>)

INKY is learning...<https://protection.inkyphishfence.com/report?id=bmV0b3JnZnQxMDM2OTU1NC9qcEBqZXBlbHN5LmNvbS8zZDMzNDE5NDk3YTFmM2NkMzliMTM2ZDhkMDBjM2NiNS8xNjUwNDk2NTEyLjM5#keyÌb77326ed2dc7e59ac09e1890e240ff<https://shared.outlook.inky.com/link?domain=protection.inkyphishfence.com&t=h.eJwdj1tPgzAARv_Kgq8KtLRcliwukxlj1hozZpQ3ehvl2gGbY8b_Lvj65eTkfD_Wuaus5cLKh8H0S8cxXTtIPui2sXVTjibXfa5kw6XN29rppGm74VGLFas_XOa9NmnzfiUxgW_JAdCn6MS3m1P6uanYC8W7ml7YPrylMbnReItpXHpfyXNNIC3JrdIkITCN85LEm2LaNN2HV1ocvicO0mQ77gqC70o5rjhnQeBBXwooeCBxlHE3kiCMXAmRq5R1v7DK-UUjh7Y7qgG4nh9hjJzCrAtpZNWP__2CCQZCgVkYKYCQCjyshGLYR0AhxKUDfOxi5EMvtHE0a-WsFdlFC1tlXXs-5muuzIPpuX3kNs9mRkxMc66q3z83SGnI.MEUCIQCznq8_0ixOh1JmzVAmseYaAxHW8_pgmtz3hJnv3rn26QIgMqTwSqXIP5ZThGsWwapITYOtMXAjvu-QgTvs1IkjG5s>> Report This Email<https://protection.inkyphishfence.com/report?id=bmV0b3JnZnQxMDM2OTU1NC9qcEBqZXBlbHN5LmNvbS8zZDMzNDE5NDk3YTFmM2NkMzliMTM2ZDhkMDBjM2NiNS8xNjUwNDk2NTEyLjM5#keyÌb77326ed2dc7e59ac09e1890e240ff<https://shared.outlook.inky.com/link?domain=protection.inkyphishfence.com&t=h.eJwdj1tPgzAARv_Kgq8KtLRcliwukxlj1hozZpQ3ehvl2gGbY8b_Lvj65eTkfD_Wuaus5cLKh8H0S8cxXTtIPui2sXVTjibXfa5kw6XN29rppGm74VGLFas_XOa9NmnzfiUxgW_JAdCn6MS3m1P6uanYC8W7ml7YPrylMbnReItpXHpfyXNNIC3JrdIkITCN85LEm2LaNN2HV1ocvicO0mQ77gqC70o5rjhnQeBBXwooeCBxlHE3kiCMXAmRq5R1v7DK-UUjh7Y7qgG4nh9hjJzCrAtpZNWP__2CCQZCgVkYKYCQCjyshGLYR0AhxKUDfOxi5EMvtHE0a-WsFdlFC1tlXXs-5muuzIPpuX3kNs9mRkxMc66q3z83SGnI.MEUCIQCznq8_0ixOh1JmzVAmseYaAxHW8_pgmtz3hJnv3rn26QIgMqTwSqXIP5ZThGsWwapITYOtMXAjvu-QgTvs1IkjG5s>> FAQ<https://www.inky.com/banner-faq<https://shared.outlook.inky.com/link?domain=www.inky.com&t=h.eJwlzNsSgiAUQNFfcXhOkOSQ-uSvcDteQ0LMaZr-vZje195vcsSVdAUZUwp7x9h5nnTyy4ua7c608t7FEtWDXAqyZOdd2uKAiVe1bAEEm0M_u-DW_Z9YbTVvLOimRS4E3mpAixqk4CiEcYxLqEDIa91QaPPW5a1Vz8lSVHE7hrE3GMqwGzoYalQ29mf8sa6fLyRLNgY.MEYCIQD-hXIRWmZc_Iz7uLRktZ8sXC7FTJEpT6m0fGkooAFw2wIhANabKVeOmv8thANSqkTpL_21NKH2RY7o4SPL8c0zkfkF>> GoDaddy Advanced Email Security, Powered by INKY<https://www.inky.com/protection-by-inky<https://shared.outlook.inky.com/link?domain=www.inky.com&t=h.eJwlzEsOgyAUheGtGMYVpHKpOnIr8rg-CwSxxjTde0s6PfnO_yZH3EhXkCmlsHeMnedJZ7deVPsnC9Enq9PsXamuMs_kVpA1e2eTjyMmXtWyBRBsCf1ig932_9Uoo3hjQDUtciHwUQMaVCAFRyG0ZVxCBULe64ZCm7M2Z83wmg3FIfpjnHqNoQy7pqOmesjG_Iw7tu3zBW_1OWI.MEUCIHcyuO4_9e6QlZ97QV-IntL3K_f09smmxp-SMDUJfWTOAiEAxibqkCE3tIEFzlS8FZiUAhvSp83N61s9cOGqFtVnzjY>>





Hmm, interesting. I have the languages installed in my Voiceover settings



but none of them are used *except* for Chinese. I *do* hear the last



option in the select announced in Chinese. Not sure why just that one is



honored.







But I hear the same ignoring of the language with the option element with



JAWS and NVDA too, but all the languages are ignored, including Chinese.







I tried setting the language on the <select> element as well as the <label>



element. The label itself could be read in another language but when I



displayed the dropdown list, it switched back to English.







I'm not aware of a workaround. Just confirming your results, sorry.

From: Steve Green
Date: Thu, Apr 21 2022 8:38AM
Subject: Re: Lang attributes not being respected by VoiceOver in select options?
← Previous message | No next message

I think you are on to something here, David. When a combobox is open, the select element retains focus the whole time. It therefore would make sense that everything that screen readers say will use its "lang" attribute.

The options go into a "selected" state as you navigate through the list, but they do not receive focus. Modifying the "lang" attribute for the select element to match the selected option would work in principle, but there is no guarantee it will work in practice.

Steve Green
Managing Director
Test Partners Ltd


-----Original Message-----
From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of David Farough
Sent: 21 April 2022 14:04
To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = >
Subject: Re: [WebAIM] Lang attributes not being respected by VoiceOver in select options?

I tried this as well.
It appears to me that the screen reader may be speaking the contents of the edit rather than the option being selected.
Perhaps the best approach might be to modify the lang setting for the edit to match the option being selected.

Not sure that this would work however. The screen reader might not recognize the change of language without a virtual screen refresh.

-----Original Message-----
From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of jp Jamous
Sent: Wednesday, April 20, 2022 7:26 PM
To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = >
Subject: Re: [WebAIM] Lang attributes not being respected by VoiceOver in select options?

I have experienced certain behaviors with other components in the past. Have you tried adding the language to each <option> instead of the <select>? I would also recommend pressing Insert + spacebar followed by z, to load the JAWS default settings. That tends to help. Not sure why with my own personal settings, JAWS does not always switch the synthesizer. I typically don't change my settings from the default ones, except to readability preferences that do not get impacted by HTML. Yet, if I load the default settings, I always hear the change in synthesizers. It is worth trying that.


From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of glen walker
Sent: Wednesday, April 20, 2022 6:15 PM
To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = >
Subject: Re: [WebAIM] Lang attributes not being respected by VoiceOver in select options?

Hmm, interesting. I have the languages installed in my Voiceover settings but none of them are used *except* for Chinese. I *do* hear the last option in the select announced in Chinese. Not sure why j External ( = EMAIL ADDRESS REMOVED = <mailto: = EMAIL ADDRESS REMOVED = >)
INKY is learning...<https://protection.inkyphishfence.com/report?id=bmV0b3JnZnQxMDM2OTU1NC9qcEBqZXBlbHN5LmNvbS8zZDMzNDE5NDk3YTFmM2NkMzliMTM2ZDhkMDBjM2NiNS8xNjUwNDk2NTEyLjM5#keyÌb77326ed2dc7e59ac09e1890e240ff> Report This Email<https://protection.inkyphishfence.com/report?id=bmV0b3JnZnQxMDM2OTU1NC9qcEBqZXBlbHN5LmNvbS8zZDMzNDE5NDk3YTFmM2NkMzliMTM2ZDhkMDBjM2NiNS8xNjUwNDk2NTEyLjM5#keyÌb77326ed2dc7e59ac09e1890e240ff> FAQ<https://www.inky.com/banner-faq> GoDaddy Advanced Email Security, Powered by INKY<https://www.inky.com/protection-by-inky>


Hmm, interesting. I have the languages installed in my Voiceover settings

but none of them are used *except* for Chinese. I *do* hear the last

option in the select announced in Chinese. Not sure why just that one is

honored.



But I hear the same ignoring of the language with the option element with

JAWS and NVDA too, but all the languages are ignored, including Chinese.



I tried setting the language on the <select> element as well as the <label>

element. The label itself could be read in another language but when I

displayed the dropdown list, it switched back to English.



I'm not aware of a workaround. Just confirming your results, sorry.