The purpose of the accessibility code in the embedder repo is to act as an intermediary between the Flutter engine and the Fuchscia Semantics Manager. The AccessibilityBridge class implements this functionality.
Flutter Engine <--> Accessibility Bridge <--> Fuchsia Semantics Manager
The accessibility bridge must forward information between Flutter and Fuchsia. Its specific responsibilities can be broken down by functionality:
Functionality | Code Path | A11y Interface | Flutter Engine Interface |
---|---|---|---|
Enable/Disable Semantics | Fuchsia --> Bridge --> Flutter | OnSemanticsModeChanged | FlutterEngineUpdateSemanticsEnabled |
Perform Accessibility Actions | Fuchsia --> Bridge --> Flutter | OnAccessibilityActionRequested | FlutterEngineDispatchSemanticsAction |
Add Semantics Update | Flutter --> Bridge --> Fuchsia | UpdateSemanticNodesDeleteSemanticNodesCommitUpdates | update_semantics_callback |
Hit Test | Fuchsia --> Bridge | HitTest | N/A |
Message Announcement | Flutter --> Bridge --> Fuchsia | RequestAnnounceSendSemanticEvent | FlutterPlatformMessageCallback |
Set Pixel Ratio | Fuchsia --> Bridge | SetPixelRatio | N/A |
This is the factor used to convert between a view’s logical coordinate space (assigned by scenic) and its allocated buffer size.
For example, on Nest Hub Max, Flutter views have a logical size of (1024x640) and an allocated size of (1280x800), so they have a pixel scale of 1.25.
ffx setui accessibility set -s true
(note, this will temporarily disable touch/mouse input)ffx inspect show core/ui/a11y_manager
Custom semantic actions are not supported yet.