Skip to content

Talkback doesn't always see platform view contents in Hybrid Composition mode #113626

@stuartmorgan-g

Description

@stuartmorgan-g

During investigation of #101887 I'm seeing that platform view accessibility seems to be broken in at least some cases in Hybrid Composition.

Example steps to reproduce:

  • Run the example app from webview_flutter, making sure it's in HC mode (currently that's true by default because of the transparent background.)
  • Run on Android with Talkback enabled, and try to get to the web view contents.

What I'm seeing is that the webview is completely invisible to Talkback (not only tapping, but if I enable the "dump node tree" option in Talkback developer settings, the resulting tree doesn't list the webview). It appears that this is due to the overlay view that displays the widgets that are over the platform view in the Flutter widget tree (in this case the favorites button); if I run with a local engine modified to not add the overlay view to the Flutter view, it's in the a11y node tree and can be inspected by tapping as expected (although of course other things are broken). It may be that this only happens if there are actually overlays, but I haven't investigated that yet.

The same test works fine in TLHC mode, which is not surprising since we don't use an overlay view for TLHC.

I'm not familiar enough with the internals of Android's a11y system to know why this happens; naively I would expect fully transparent view overlays to mask a11y elements that are underneath them. If possible, we need to find a way to have only the opaque parts of the overlay be treated by the a11y system as hiding what is underneath them. (/cc @chunhtai @bparrishMines )

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: platform-viewsEmbedding Android/iOS views in Flutter appsengineflutter/engine related. See also e: labels.platform-androidAndroid applications specificallyplatform-views: hcIssues specific to the Hybrid Composition platform views backendplatform-views: hcppIssues which affect the HCPP platform views backendteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions