Accessibility: improve Windows/NVDA screen reader support#2095
Accessibility: improve Windows/NVDA screen reader support#2095michaldziwisz wants to merge 1 commit intoYubico:mainfrom
Conversation
Improve semantics and keyboard/screen-reader behavior across the app, with a focus on Windows (NVDA). Adds a Windows announcements bridge, fixes toggle/selected state semantics, improves dialogs/help/shortcuts, and adds regression tests.
|
First off, thank you for your work on this! Accessibility is important to us and we are making a push to improve the app in this regard, so we are very happy for the help. Unfortunately I don't think we'll be able to merge this PR as it stands, as it changes a lot of things and it is not fully clear what code addresses what issues. In short, it will take a long time for someone to figure out what each change actually does and to make sure it is needed, and doesn't cause unintended issues (eg. problems on other platforms). For future reference, having PRs broken up into semantically distinct changes helps a lot with this, rather than a single commit. It also seems that a lot of Widgets seems to have been replaced with others, and while that may offer improvements in accessibility, it may hurt maintainability of the code and there may be better ways of solving the same issue. So, what can we do with this? Hopefully as we work on accessibility issues we can use this as a reference for items that need to be addressed, and the code changes as a more concrete form of that: Showing exactly the functional change that is needed. I will leave this PR open for now as we DO want to address these issues. |
|
That’s correct. I only tested accessibility on Windows, so it’s difficult to determine what impact these changes might have on the apps on other systems. And if all applications are built from a single codebase, then of course it’s important to make sure that improving one thing doesn’t break something that already works. I hope this example proves useful and at least points in the direction of what could be improved to make your application more accessible. |
Summary
This PR improves accessibility across the Flutter app, with a strong focus on Windows + NVDA. It addresses multiple screen-reader and keyboard navigation issues reported during everyday flows (e.g., adding OATH accounts, toggling options like “Require touch”/PIN protection, navigation selected-state announcements, reading of help/shortcuts content, and reliable announcement of transient feedback).
Key changes
Semantics & keyboard navigation
selectedsemantics (unselected items no longer announce as selected). Also reduces duplicate announcements.AppToggleChipto consistently expose checked semantics, correct enabled/disabled state, and reliable activation via screen reader / keyboard.AppToggleChipand announce state changes.Screen reader announcements (feedback)
AccessibilityAnnouncer(Dart) that prefers a Windows-native announcement path and falls back to Flutter framework announcements where appropriate.Windows runner (native)
yubico_authenticator/a11ymethod channel on Windows.Text editing (Windows/NVDA)
Tests
Adds regression/widget tests for:
AppToggleChipsemantics + activation,Validation
flutter analyze(Windows) ✅flutter test(Windows) ✅AI disclosure / limitations