VoiceOver: Detect Languages

My app does not automatically switch languages (voices) in VoiceOver when I have VoiceOver on and the screen includes both English and Spanish content. Instead of switching between the correctly accented voice, whatever my manual Voices rotor setting is, that's what the content is announced as. I can manually switch the Voice in the rotor to make words sound inteligible but my main concern is that language changes are not auto-detected even though that feature in my Settings is on. VO does detect language changes in other apps, so I think there must be either misplaced or missing accessibiiltyLanguage strings somewhere in my app. Or is it more than that for localization considerations?

I reached out to the Apple Accessibilty team and was directed to open a ticket here, as my question is about the underlying code.

I am a novice developer and primarily accessibility SME; i expect that wnen "detect languages" is on in the user settings for VoiceOver, that the voice for the screen reader speech output will automatically switch to the correct language / accent. I recognize there is a problem but am not sure where the breakdown is. I would like guidance how to fix it to relay to my teams.

https://developer.apple.com/documentation/objectivec/nsobject/1615192-accessibilitylanguage

Can you share some code samples? My suggestion would be what you listed: to use the accessibilityLanguage attribute for attributed strings and then set it as the element's accessibilityAttributedLabel

https://developer.apple.com/documentation/objectivec/nsobject/2865944-accessibilityattributedlabel

VoiceOver: Detect Languages
 
 
Q