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

Add back tooltip to Embedder #37676

Merged
merged 4 commits into from
Nov 16, 2022
Merged

Conversation

yaakovschectman
Copy link
Contributor

PR #37192 accidentally removed the tooltip property when creating FlutterSemanticsNode in the embedder. This PR adds it back so that tooltips are again used by a11y.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@yaakovschectman yaakovschectman self-assigned this Nov 16, 2022
@flutter-dashboard flutter-dashboard bot added the embedder Related to the embedder API label Nov 16, 2022
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

LGTM 👍 I do see this line removed in the referenced PR.

Is there any way to test this or do you plan to get an exception?

@@ -1292,6 +1292,7 @@ FlutterSemanticsNode CreateEmbedderSemanticsNode(
node.customAccessibilityActions.size(),
node.customAccessibilityActions.data(),
node.platformViewId,
node.tooltip.c_str(),
Copy link
Member

@loic-sharma loic-sharma Nov 16, 2022

Choose a reason for hiding this comment

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

Could we test this by updating the Dart fixture to have a node with a tooltip and verifying that in accessibility test?

@@ -101,6 +103,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistent) {
ASSERT_EQ(7.0, node->transform.pers0);
ASSERT_EQ(8.0, node->transform.pers1);
ASSERT_EQ(9.0, node->transform.pers2);
ASSERT_EQ(std::strncmp(tooltip, node->tooltip, sizeof(tooltip) - 1), 0);
Copy link
Member

Choose a reason for hiding this comment

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

Please update A11yTreeIsConsistentUsingLegacyCallbacks below too

Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

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

Please update A11yTreeIsConsistentUsingLegacyCallbacks too and LGTM

@@ -24,6 +24,8 @@ namespace testing {

using EmbedderA11yTest = testing::EmbedderTest;

const static char tooltip[] = "tooltip";
Copy link
Member

@cbracken cbracken Nov 16, 2022

Choose a reason for hiding this comment

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

This can be constexpr (and kTooltip).

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

lgtm!

@yaakovschectman yaakovschectman merged commit d7f49f6 into flutter:main Nov 16, 2022
@yaakovschectman yaakovschectman deleted the tooltip branch November 16, 2022 22:02
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 16, 2022
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 17, 2022
…115504)

* d7f49f605 Add back tooltip to Embedder (flutter/engine#37676)

* c5e6a38dd Fix potential null-point references (flutter/engine#37678)
shogohida pushed a commit to shogohida/flutter that referenced this pull request Dec 7, 2022
…lutter#115504)

* d7f49f605 Add back tooltip to Embedder (flutter/engine#37676)

* c5e6a38dd Fix potential null-point references (flutter/engine#37678)
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jan 19, 2023
…lutter#115504)

* d7f49f605 Add back tooltip to Embedder (flutter/engine#37676)

* c5e6a38dd Fix potential null-point references (flutter/engine#37678)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accessibility embedder Related to the embedder API needs tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants