-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Use case
First things first, big thanks to the Flutter team, they did a great job, providing us great API to build and customise accessibility elements.
But it will be much appreciated if the following feature request will be taken into consideration:
In some cases we need to manage accessibility focus manually, put it on some certain element. On native platforms we have such APIs to achieve that:
iOS:
UIAccessibiliity.post(notification: .screenChanged, argument: someUIElement)
Android:
action = AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS
View.performAccessibilityAction(int action, Bundle arguments)
But it looks like we don’t have similar API on Flutter so far. We tried to control focus by assign the isFocus: field to some bool value and then change it, but it does work on Android in some cases, but it doesn’t work on iOS at all. Here are some cases in which manual control focus functionality is critical:
- When the modal view appears (for ex. error alert), somehow the Screen Reader focus, doesn’t jump on it, but it does on native iOS App by default
- After the modal view closes on iOS default behaviour of the focus is that it puts itself on top-left element of the screen, and on the element from which the modal was opened. Now focus puts itself on a random element and API for controlling focus would be very helpful in that case.
- Sometimes after application launch or new screen appearing, no element is focused on screen.
Proposal
We have great tools for accessibility so far, but in a lot of cases we need to manage Screen Reader Focus manually if we want to deliver the best accessibility experience we could. So it will be much appreciated if the Flutter team will take that API for controlling focus and make Flutter the framework for developing apps which can really used by anyone.
Thank you in advance!