class ScreenReaderAction

Defined at line 29 of file ../../src/ui/a11y/lib/screen_reader/screen_reader_action.h

Base class to implement Screen Reader actions.

This is the base class in which all Screen Reader actions depend upon. An

action is bound to an input (gesture, keyboard shortcut, braille display

keys, etc), and is triggered whenever that input happens. An action may call

the Fuchsia Accessibility APIs and / or produce some type of output (Tts, for

example). This is achieved by accessing information available to this action

through the context, which is passed in the constructor.

Protected Members

ActionContext * action_context_
ScreenReaderContext * screen_reader_context_

Public Methods

void ScreenReaderAction (ActionContext * context, ScreenReaderContext * screen_reader_context)

Defined at line 23 of file ../../src/ui/a11y/lib/screen_reader/screen_reader_action.cc

void ~ScreenReaderAction ()

Defined at line 30 of file ../../src/ui/a11y/lib/screen_reader/screen_reader_action.cc

void Run (a11y::gesture_util_v2::GestureContext gesture_context)

Action implementations override this method with the necessary method parameters to perform

that action.

Protected Methods

void ExecuteHitTesting (ActionContext * context, a11y::gesture_util_v2::GestureContext gesture_context, fuchsia::accessibility::semantics::SemanticListener::HitTestCallback callback)

Helper function to call hit testing based on ActionContext and

GestureContext.

Defined at line 32 of file ../../src/ui/a11y/lib/screen_reader/screen_reader_action.cc

fpromise::promise<> ExecuteAccessibilityActionPromise (zx_koid_t view_ref_koid, uint32_t node_id, fuchsia::accessibility::semantics::Action action)

Returns a promise that executes an accessibility action targeting the semantic tree

corresponding to |view_ref_koid|, on the node |node_id|. An error is thrown if the semantic

tree can't be found or if the semantic provider did not handle this action.

Defined at line 42 of file ../../src/ui/a11y/lib/screen_reader/screen_reader_action.cc

void ScreenReaderAction ()

Constructor for mocks.

Defined at line 47 of file ../../src/ui/a11y/lib/screen_reader/screen_reader_action.h

fpromise::promise<> SetA11yFocusPromise (zx_koid_t view_koid, uint32_t node_id)

Returns a promise that sets a new A11y Focus. If the operation is not successful, throws an

error.

Defined at line 56 of file ../../src/ui/a11y/lib/screen_reader/screen_reader_action.cc

fpromise::promise<> BuildSpeechTaskFromNodePromise (zx_koid_t view_koid, uint32_t node_id, Speaker::Options options)

Returns a promise that from a node_id and view_koid, builds a speech task to speak the node

description. An error is thrown if the semantic tree or the semantic node are missing data

necessary to build an utterance.

Defined at line 75 of file ../../src/ui/a11y/lib/screen_reader/screen_reader_action.cc

void UpdateNavigationContext (zx_koid_t newly_focused_view_koid, uint32_t newly_focused_node_id)

Updates the current and previous navigation contexts based on the newly focused node.

Defined at line 98 of file ../../src/ui/a11y/lib/screen_reader/screen_reader_action.cc

ScreenReaderMessageGenerator::ScreenReaderMessageContext GetMessageContext ()

Gets the message context for the currently focused node.

Defined at line 178 of file ../../src/ui/a11y/lib/screen_reader/screen_reader_action.cc

Records