Project: /_project.yaml Book: /_book.yaml

fuchsia.accessibility.semantics

PROTOCOLS

SemanticsManager {:#SemanticsManager}

Defined in fuchsia.accessibility.semantics/semantics_manager.fidl

An interface to manage connections with views for the purposes of gathering semantic information about their current UI state.

The manager allows clients to register as a semantic provider for their view(s). In return the semantics manager supplies an interface to update, commit and delete information from the semantic tree for that view. If the semantic manager encounters an error, it will close the channel, delete any associated data and rely on the client to re-register.

RegisterViewForSemantics {:#RegisterViewForSemantics}

Request

SemanticTree {:#SemanticTree}

Defined in fuchsia.accessibility.semantics/semantics_manager.fidl

Interface to update the semantic tree for a particular view. Nodes can be added, updated or deleted. Because the size of an update may exceed FIDL transfer limits, clients are responsible for breaking up changes into multiple update and delete calls that conform to these limits. The commit function must always be called at the end of a full update push to signal the end of an update.

The client may make several calls to UpdateSemanticNodes(...) or DeleteSemanticNodes(...) before calling CommitUpdates(), and must wait for the semantics manager to reply to the CommitUpdates() method to know whether an update has been processed. This allows the client to break up a set of changes (e.g. a re-computed semantic tree) to the semantic tree into FIDL-compatible chunks, but commit them all at once.

If the semantics manager ever receives inconsistent state from the client, such as an invalid tree or unrecognized parent node id, the server will close the channel. The client is responsible for reconnecting and re-sending its state from scratch.

UpdateSemanticNodes {:#UpdateSemanticNodes}

Sends new/updated nodes to the root to add to the cache on the next commit.

Request

DeleteSemanticNodes {:#DeleteSemanticNodes}

Tells the root to remove nodes with node_ids from the semantic tree on the next commit.

Request

CommitUpdates {:#CommitUpdates}

Commits pending changes to node tree associated with the view using UpdateSemanticNodes and DeleteSemanticNodes. Updates are processed in the order in which they are received. If the committed updates result in an ill-formed tree (for example a missing root node or a cycle) the semantic manager will close the channel.

Request

Response

SemanticListener {:#SemanticListener}

Defined in fuchsia.accessibility.semantics/semantics_manager.fidl

A semantic provider is the client-side interface that the manager can use to enable or disable semantic updates, and to ask clients to perform accessibility actions.

OnAccessibilityActionRequested {:#OnAccessibilityActionRequested}

Asks the semantics provider to perform an accessibility action on the node with node id in the front-end.

Request

Response

HitTest {:#HitTest}

Asks the semantics provider to perform hit testing and return the result.

Request

Response

OnSemanticsModeChanged {:#OnSemanticsModeChanged}

Callback telling the client whether or not to send updates to the semantic tree. The semantics manager will clear all state when this is called with updates_enabled = false. When called with updates_enabled = true, the client should sent the full state of the current semantic tree.

Request

Response

ENUMS

Action {:#Action}

Type: uint32

Defined in fuchsia.accessibility.semantics/node.fidl

Represents actions that can be applied to Nodes.

Role {:#Role}

Type: uint32

Defined in fuchsia.accessibility.semantics/node.fidl

Represents a role of an element on a UI.

TABLES

Attributes {:#Attributes}

Defined in fuchsia.accessibility.semantics/node.fidl

An attribute is an essential property to describe an element. Unlike states, attributes do not change over the life of an element. Example: A button with a label attribute ‘ok’ should never change to ‘cancel’, as this is not the same element.

States {:#States}

Defined in fuchsia.accessibility.semantics/node.fidl

A state is a dynamic property of an element that may change in response to user action or automated processes. Thus, they are different from attributes in an important point, which is frequency of change. Example: a checkbox can be checked / unchecked, and this state can be altered via user input.

Node {:#Node}

Defined in fuchsia.accessibility.semantics/node.fidl

Node: data structure to represent semantic information about a UI element.

The Node represents a semantic element on an interface. This may be a button, a text field, a checkbox or any element that has a relevant semantic meaning so that assistive technology can understand the current UI.

Hit {:#Hit}

Defined in fuchsia.accessibility.semantics/semantics_manager.fidl

Results of hit testing on a view's semantic tree which is implemented by Runtimes(like Flutter/Chrome) and sent to Accessibility.

CONSTANTS