Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@cbracken
Copy link
Member

Flutter's accessibility APIs consist of three main calls from the
embedder to the Dart application:

  1. FlutterEngineUpdateSemanticsEnabled: enables/disables semantics support.

  2. FlutterEngineUpdateAccessibilityFeatures: sets embedder-specific
    accessibility features.

  3. FlutterEngineDispatchSemanticsAction: dispatches an action (tap,
    long-press, scroll, etc.) to a semantics node.

and two main callbacks triggered by Dart code:

  1. FlutterUpdateSemanticsNodeCallback: notifies the embedder of
    updates to the properties of a given semantics node.

  2. FlutterUpdateSemanticsCustomActionCallback: notifies the embedder
    of updates to custom semantics actions registered in Dart code.

In the Flutter framework, when accessibility is first enabled, the
embedder will receive a stream of update callbacks notifying the
embedder of the full semantics tree. On further changes in the Dart
application, only updates will be sent.

Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor nits, but lgtm.

return false;
}
shell_->GetTaskRunners().GetUITaskRunner()->PostTask(
[engine = shell_->GetEngine(), id, action = std::move(action),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: action is just an int32_t. The move is not necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Nice catch; not sure how many times I had to refresh my mind this was an enum and not some messy struct :)

}
shell_->GetTaskRunners().GetUITaskRunner()->PostTask(
[engine = shell_->GetEngine(), id, action = std::move(action),
args = std::move(args)] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are attempting to prevent a copy of the args vector, then this code does not avoid the same. You can use fml::MakeCopyable with a mutable lambda to achieve it though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@goderbauer
Copy link
Member

The license script is unhappy :(

@cbracken
Copy link
Member Author

Updated docs and tweaked the type (and name) of FlutterSemanticsCustomAction.override_action (was override_id).

Flutter's accessibility APIs consist of three main calls from the
embedder to the Dart application:

  1. FlutterEngineUpdateSemanticsEnabled: enables/disables semantics support.

  2. FlutterEngineUpdateAccessibilityFeatures: sets embedder-specific
     accessibility features.

  3. FlutterEngineDispatchSemanticsAction: dispatches an action (tap,
     long-press, scroll, etc.) to a semantics node.

and two main callbacks triggered by Dart code:

  1. FlutterUpdateSemanticsNodeCallback: notifies the embedder of
     updates to the properties of a given semantics node.

  2. FlutterUpdateSemanticsCustomActionCallback: notifies the embedder
     of updates to custom semantics actions registered in Dart code.

In the Flutter framework, when accessibility is first enabled, the
embedder will receive a stream of update callbacks notifying the
embedder of the full semantics tree. On further changes in the Dart
application, only updates will be sent.
@cbracken cbracken merged commit abe9826 into flutter:master Feb 21, 2019
@cbracken cbracken deleted the embedder-a11y branch February 21, 2019 02:59
@cbracken
Copy link
Member Author

Fixes flutter/flutter#24789.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 21, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 21, 2019
cbracken added a commit to cbracken/flutter that referenced this pull request Feb 21, 2019
flutter/engine@293b3de98 Roll src/third_party/skia 20ebd0cb3882..348227b89430 (4 commits) (flutter/engine#7900)
flutter/engine@6e6020d29 Eliminate .member = foo struct initialization (flutter/engine#7899)
flutter/engine@6d8bd99af Revert "Reland PerformanceOverlayLayer golden test (flutter/engine#7863)" (flutter#7895)
flutter/engine@39f7066b6 Test profile and release build and unit tests (flutter/engine#7880)
flutter/engine@abe9826a9 Add accessibility semantics support to embedder (flutter/engine#7891)
flutter/engine@ce7016e1f Roll src/third_party/skia e471c05f92e8..20ebd0cb3882 (4 commits) (flutter/engine#7894)
flutter/engine@684c9394c Respect the custom GL proc table when creating the resource context on the IO thread. (flutter/engine#7893)
flutter/engine@e11d0e96f Android embedding refactor pr5 add flutterengine impl (flutter/engine#7878)
flutter/engine@2f4a38dbd Android embedding refactor pr3 add remaining systemchannels (flutter/engine#7892)
flutter/engine@8427d73c8 Reland PerformanceOverlayLayer golden test (flutter/engine#7863)
flutter/engine@61fc1786f Roll src/third_party/dart c92d5ca288..5ddd157809 (153 commits)
flutter/engine@b0671145a Roll src/third_party/skia 7738736f9622..e471c05f92e8 (23 commits) (flutter/engine#7889)
flutter/engine@6d7eb5218 Revert "Android embedding refactor pr3 add remaining systemchannels (flutter/engine#7874)" (flutter#7886)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 21, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 21, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 21, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 21, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 22, 2019
cbracken added a commit to cbracken/flutter that referenced this pull request Feb 22, 2019
flutter/engine@f1f19bba8 Revert "Revert "Revert "Reland PerformanceOverlayLayer golden test (flutter/engine#7863)" (flutter/engine#7895)" (flutter/engine#7911)" (flutter/engine#7916)
flutter/engine@5db4b3772 Revert dart rolls (flutter/engine#7913)
flutter/engine@0053c1d50 Roll src/third_party/dart 75ee523f91..4cff5a4fd6 (6 commits)
flutter/engine@8620579cf Roll src/third_party/skia 9a049e6ce39d..63c4d3596915 (8 commits) (flutter/engine#7909)
flutter/engine@aa2b287cb Reland flutter/engine#7777 with proper LICENSE (flutter/engine#7888)
flutter/engine@a5773d121 Do not add ghost runs for trailing whitespace if the text is ellipsized (flutter/engine#7906)
flutter/engine@93eeb48ba Revert "Revert "Remove unnecessary entry-point closurization. (flutter/engine#7827)" (flutter/engine#7876)" (flutter/engine#7904)
flutter/engine@bbaeba3f3 Roll src/third_party/skia 05ff93c43ea5..9a049e6ce39d (11 commits) (flutter/engine#7903)
flutter/engine@1cf6b8b64 Roll src/third_party/dart 5ddd157809..75ee523f91 (19 commits)
flutter/engine@be32040ef Roll src/third_party/skia 348227b89430..05ff93c43ea5 (2 commits) (flutter/engine#7901)
flutter/engine@293b3de98 Roll src/third_party/skia 20ebd0cb3882..348227b89430 (4 commits) (flutter/engine#7900)
flutter/engine@6e6020d29 Eliminate .member = foo struct initialization (flutter/engine#7899)
flutter/engine@6d8bd99af Revert "Reland PerformanceOverlayLayer golden test (flutter/engine#7863)" (flutter/engine#7895)
flutter/engine@39f7066b6 Test profile and release build and unit tests (flutter/engine#7880)
flutter/engine@abe9826a9 Add accessibility semantics support to embedder (flutter/engine#7891)
flutter/engine@ce7016e1f Roll src/third_party/skia e471c05f92e8..20ebd0cb3882 (4 commits) (flutter/engine#7894)
flutter/engine@684c9394c Respect the custom GL proc table when creating the resource context on the IO thread. (flutter/engine#7893)
flutter/engine@e11d0e96f Android embedding refactor pr5 add flutterengine impl (flutter/engine#7878)
flutter/engine@2f4a38dbd Android embedding refactor pr3 add remaining systemchannels (flutter/engine#7892)
flutter/engine@8427d73c8 Reland PerformanceOverlayLayer golden test (flutter/engine#7863)
flutter/engine@61fc1786f Roll src/third_party/dart c92d5ca288..5ddd157809 (153 commits)
flutter/engine@b0671145a Roll src/third_party/skia 7738736f9622..e471c05f92e8 (23 commits) (flutter/engine#7889)
flutter/engine@6d7eb5218 Revert "Android embedding refactor pr3 add remaining systemchannels (flutter/engine#7874)" (flutter/engine#7886)
flutter/engine@dad6ec01c Correct onAccessibilityFeaturesChanged docs (flutter/engine#7883)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 22, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 22, 2019
cbracken added a commit to flutter/flutter that referenced this pull request Feb 22, 2019
flutter/engine@f1f19bba8 Revert "Revert "Revert "Reland PerformanceOverlayLayer golden test (flutter/engine#7863)" (flutter/engine#7895)" (flutter/engine#7911)" (flutter/engine#7916)
flutter/engine@5db4b3772 Revert dart rolls (flutter/engine#7913)
flutter/engine@0053c1d50 Roll src/third_party/dart 75ee523f91..4cff5a4fd6 (6 commits)
flutter/engine@8620579cf Roll src/third_party/skia 9a049e6ce39d..63c4d3596915 (8 commits) (flutter/engine#7909)
flutter/engine@aa2b287cb Reland flutter/engine#7777 with proper LICENSE (flutter/engine#7888)
flutter/engine@a5773d121 Do not add ghost runs for trailing whitespace if the text is ellipsized (flutter/engine#7906)
flutter/engine@93eeb48ba Revert "Revert "Remove unnecessary entry-point closurization. (flutter/engine#7827)" (flutter/engine#7876)" (flutter/engine#7904)
flutter/engine@bbaeba3f3 Roll src/third_party/skia 05ff93c43ea5..9a049e6ce39d (11 commits) (flutter/engine#7903)
flutter/engine@1cf6b8b64 Roll src/third_party/dart 5ddd157809..75ee523f91 (19 commits)
flutter/engine@be32040ef Roll src/third_party/skia 348227b89430..05ff93c43ea5 (2 commits) (flutter/engine#7901)
flutter/engine@293b3de98 Roll src/third_party/skia 20ebd0cb3882..348227b89430 (4 commits) (flutter/engine#7900)
flutter/engine@6e6020d29 Eliminate .member = foo struct initialization (flutter/engine#7899)
flutter/engine@6d8bd99af Revert "Reland PerformanceOverlayLayer golden test (flutter/engine#7863)" (flutter/engine#7895)
flutter/engine@39f7066b6 Test profile and release build and unit tests (flutter/engine#7880)
flutter/engine@abe9826a9 Add accessibility semantics support to embedder (flutter/engine#7891)
flutter/engine@ce7016e1f Roll src/third_party/skia e471c05f92e8..20ebd0cb3882 (4 commits) (flutter/engine#7894)
flutter/engine@684c9394c Respect the custom GL proc table when creating the resource context on the IO thread. (flutter/engine#7893)
flutter/engine@e11d0e96f Android embedding refactor pr5 add flutterengine impl (flutter/engine#7878)
flutter/engine@2f4a38dbd Android embedding refactor pr3 add remaining systemchannels (flutter/engine#7892)
flutter/engine@8427d73c8 Reland PerformanceOverlayLayer golden test (flutter/engine#7863)
flutter/engine@61fc1786f Roll src/third_party/dart c92d5ca288..5ddd157809 (153 commits)
flutter/engine@b0671145a Roll src/third_party/skia 7738736f9622..e471c05f92e8 (23 commits) (flutter/engine#7889)
flutter/engine@6d7eb5218 Revert "Android embedding refactor pr3 add remaining systemchannels (flutter/engine#7874)" (flutter/engine#7886)
flutter/engine@dad6ec01c Correct onAccessibilityFeaturesChanged docs (flutter/engine#7883)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants