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

Conversation

@abrush21
Copy link
Contributor

Description

This change ensures that the accessibility bridge correctly specifies which semantics actions are available to each node in a semantics update.

Related Issues

https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=57668&q=owner%3Ame&can=2

Tests

I added the following tests:

Added an accessibility bridge unit test verifying that semantics actions are translated correctly.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the contributor guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the C++, Objective-C, Java style guides for the engine.
  • I read the tree hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation.
  • All existing and new tests are passing.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read handling breaking changes.

Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

I am not familiar with fuchsia accessiblity API, but the flutter side code LGTM

std::vector<fuchsia::accessibility::semantics::Action> node_actions;

if (node.HasAction(flutter::SemanticsAction::kTap)) {
node_actions.push_back(fuchsia::accessibility::semantics::Action::DEFAULT);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is more a FYI. For a lack of a better name, we are thinking adding a semantics action that call DefaultAction to support ios magic tap. https://developer.apple.com/documentation/objectivec/nsobject/1615137-accessibilityperformmagictap?language=objc.

I am not sure how should they overlap here. Is the Action::DEFAULT always referring to tap in fuchsia?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the heads-up. Based on the description in that link, it looks like Action::Default is the most appropriate mapping for SemanticsAction::kTap.

.set_transform(GetNodeTransform(flutter_node))
.set_attributes(GetNodeAttributes(flutter_node, &this_node_size))
.set_states(GetNodeStates(flutter_node, &this_node_size))
.set_actions(GetNodeActions(flutter_node, &this_node_size))
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not familiar with fuchsia code. Do you know where are these APIs defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

ah I see, thanks for the link

@chinmaygarde chinmaygarde merged commit 30b829e into flutter:master Sep 3, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 5, 2020
flar pushed a commit to flutter/flutter that referenced this pull request Sep 8, 2020
* 30b829e Populates fuchsia node actions in semantics updates. (flutter/engine#20451)

* c2e7010 Roll Skia from 1ee21cdfb6fe to 6763a713f957 (1 revision) (flutter/engine#20982)

* 841401d restore FML_DCHECK removed due to a code reviewing error (flutter/engine#20953)

* 367c6db Don't use GetTaskQueueId() in rasterizer as it breaks Fuchsia (flutter/engine#20983)

* b22a8c6 Let FlutterActivity/Fragment/FragmentActivity have an app bundle path override instead of eager resolving during construction (flutter/engine#20769)

* 0f0ae68 Update test Dart code to pass the latest Dart analyzer rules (flutter/engine#20986)

* d77dd31 Manual roll of Dart b29f228f62...016e8880f0 (flutter/engine#20967)

* c7b3d53 Roll Fuchsia Mac SDK from gOI3W1UNU... to EN2ycWLxi... (flutter/engine#20985)

* 6a6986d improve sensitivity of BackdropFilter web tests (flutter/engine#20915)

* 9fc9cb2 Roll Dart SDK from 016e8880f0ab to 0f0cff3922ad (7 revisions) (flutter/engine#20990)

* 242d522 [Android R] Sync keyboard animation with view insets vs Android 11/R/API 30 WindowInsetsAnimation (flutter/engine#20843)

* b4e0896 Roll Fuchsia Linux SDK from 81O8Kg_Rw... to A0PKwETay... (flutter/engine#20998)

* d77c4e5 adjust blur radius for HTML to match CanvasKit (flutter/engine#20840)

* 0628492 Roll Dart SDK from 0f0cff3922ad to f3a9ca88b664 (1 revision) (flutter/engine#21000)

* d1d848e Roll Fuchsia Mac SDK from EN2ycWLxi... to sih5f60Gt... (flutter/engine#20999)
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