-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Description
Use case
Allow declaring the main language of an app to assistive technology such as TalkBack and VoiceOver.
When an app correctly declare its language, the voice engine can select an appropriate voice for the content. This is important because it is common that screen readers have separate voice engines for each language. Using eg. the English language engine to read Swedish text makes it harder for the user to hear and understand what is being said. In the linked issues below there are video recordings where VoiceOver uses the wrong voice as well as sample app code to reproduce the issue.
Supporting sources
This is a top-level recommendation in WCAG accessibility guidelines.
Proposal
Make MaterialApp.locale
propagate to assitive technology similar to how <html lang="sv-SE">
sets the language in HTML.
Alternatively, provide a widget similar to Localizations.override
that does communicate locale to TalkBack and VoiceOver. A such widget could be used by Flutter app to wrap all their content and ma also be used to satisfy the WCAG level AA recommendation to indicate change in language on a page.
Related issues
- Multiple problems with VoiceOver on iOS not using the correct locale. #99018 (code sample + video)
- Flutter Web & Desktop do not set language for screen readers #98948 (code sample + video)
- Set locale of subtree #98835 (provides 2 use cases)