-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
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 )