Add accessibilityLanguage (VoiceOver speech language) modifier for SwiftUI views
S
Sinan BOZKUŞ
## Summary
@expo/ui/swift-ui/modifiers
exposes accessibilityLabel
, accessibilityHint
, accessibilityValue
, and recently accessibilityHidden
/ accessibilityIdentifier
— but there is no way to set a view's VoiceOver speech language
. In multilingual apps where the in-app UI language can differ from the device language, VoiceOver pronounces SwiftUI labels with the device-language voice, producing garbled speech.## Use case
A language-learning app where users pick the app interface language independently of the device language. For React Native views we use the
accessibilityLanguage
prop (BCP-47) so VoiceOver reads each element in the correct language. There is no equivalent for @expo/ui
SwiftUI components — e.g. a Menu
with Button
items whose labels are already localized text but get read in the wrong accent.## What we tried
- No accessibilityLanguage/ speech-language modifier exists in@expo/ui/swift-ui/modifiers.
- accessibilityLabel(label: string)only takes a plainstring, so we can't pass anAttributedStringcarryingaccessibilitySpeechLanguage.
- environment('locale', '<bcp47>')makes VoiceOver pronounce the **Menutrigger labelin the given language ✅, but it doesnot** reach theMenu's presented popup items; per-itemenvironment('locale', …)had no effect on the items either.
## Proposal
Add an
accessibilityLanguage(bcp47: string)
modifier mapping to SwiftUI's accessibility speech language (e.g. an AttributedString
with accessibilitySpeechLanguage
, or the underlying UIKit accessibilityLanguage
), in a way that also propagates to a Menu
's presented items.## Environment
- @expo/ui: 56.0.14
- expo: ~56
- react-native: 0.85.3
- Platform: iOS 26 (SwiftUI Menu)
Nishan Bende
Sinan BOZKUŞ we support environment modifier with
locale
key. Check this out - https://docs.expo.dev/versions/latest/sdk/ui/swift-ui/modifiers/#environmentkey-value. This should handle the accessibility language, let us know if you face any issues.