Fuchsia Accessibility Framework

Overview

Every modern operating system implements a different framework to support assistive technology (e.g. IAccessible on Windows, NSAccessibility on OS X, ATK on Linux, AccessibilityNodeInfo on Android). Specific accessibility features such as screen readers are built on top of those frameworks. These frameworks are typically responsible for understanding what is on screen at a given time through a semantic tree, and providing APIs to mediate input and output to the device so that accessibility services can implement different modes of navigating the UI. There is a nice overview of this available in the Chromium public docs.

Some examples of accessibility features include: screen readers, switch access control, braille devices, magnification, high contrast mode, color correction, reduced motion, closed captioning, and more.

Fuchsia's accessibility framework is primarily implemented in the Accessibility Manager. It supports the following accessibility features:

Accessibility Manager

Accessibility Manager has the following responsibilities:

  • Manage accessibility settings
  • Implement the semantics API
  • Integrate with Scenic (fuchsia graphics renderer & touch handler) to modify the display to support accessibility features such as magnification
  • Understand the relationship between scenic views and clients (e.g. flutter)
  • Mediate input and output (e.g. touch, audio) as needed by accessibility services
  • Mediate access to system services (e.g. TTS) needed for accessibility features

The Accessibility Manager is a part of the Fuchsia platform and runs on any Fuchsia product with a screen. It is closely integrated with Scenic.

Accessibility manager code lives in /src/ui/a11y/bin/a11y_manager/.

Settings

Accessibility settings will be managed through SetUI, which is responsible for storing settings locally and notifying the Accessibility Manager when settings change. This is done via the fuchsia.settings.accessibility API. The accessibility manager is responsible for notifying other system components of changes (e.g. scenic, flutter/chromium runtimes).

For additional information see Accessibility Settings.

Semantic Tree Data

The Fuchsia UI is composed of views (surfaces drawn by Scenic). Views are positioned within a view tree. Each view has a client responsible for the content of the view, typically Flutter or Chromium. Each client knows how to supply a semantic tree corresponding to the elements the user can currently view or interact with. This is generally a simplified version of the current graphics rendering tree which includes elements which are semantically meaningful to users but eliminates things like buffer spaces and bounding boxes.

The API can be found in fuchsia.accessibility.semantics. This API allows a runtime to register with the Accessibility Manager to provide semantic updates, and then call Update, Delete and Commit methods to send information about its semantics. The Accessibility Manager is responsible for implementing the server side of the semantics API.

For additional information see Accessibility Semantics.

Accessibility View

The accessibility manager owns a view in the Fuchsia view tree. This view allows accessibility to intercept gestures, change graphics, inject input, and participate in focus changes.

For more information see Accessibility View.

Input and Output

Touch and keyboard events

The accessibility manager works with scenic to intercept user input events when relevant accessibility features are enabled and implements a gesture arena to handle user gestures.

For more information see Accessibility Input.

Focus management

The accessibility manager has a notion of "accessibility focus", or which semantic node is currently active. The accessibility manager is the source-of-truth for which node has accessibility focus. For more information see Accessibility Focus.

Highlights

The accessibility manager works with scenic to draw a "highlight" around the currently focused node. For more information see Accessibility Highlights.

Text to Speech

The Accessibility Manager will provide APIs for accessibility services to trigger speech events.

For more information see TTS.

Testing the Accessibility Framework

Accessibility tests live in src/ui/a11y/lib/testing/.