Skip to content

Accessibility Screen Reader: Control Focus API #91290

@goob0176

Description

@goob0176

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!

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressiona: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Fluttercustomer: crowdAffects or could affect many people, though not necessarily a specific customer.customer: soldierengineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyplatform-iosiOS applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions