From ff2fdf4039a51d4c5c9360c042486e90a6364e9a Mon Sep 17 00:00:00 2001 From: Greg Spencer Date: Thu, 10 Oct 2019 15:19:58 -0700 Subject: [PATCH] Fix semantics testing now that dropdown can take a11y focus again. (#42475) Fixes the android_semantics_testing integration test to have the right criteria now that ce15097 has landed. --- .../test_driver/main_test.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/integration_tests/android_semantics_testing/test_driver/main_test.dart b/dev/integration_tests/android_semantics_testing/test_driver/main_test.dart index 8d5fac40c1..051d90d293 100644 --- a/dev/integration_tests/android_semantics_testing/test_driver/main_test.dart +++ b/dev/integration_tests/android_semantics_testing/test_driver/main_test.dart @@ -369,10 +369,9 @@ void main() { isEnabled: true, isFocusable: true, actions: [ - // TODO(gspencergoog): This should really be clearAccessibilityFocus, - // but TalkBack doesn't find it for some reason. - // https://github.com/flutter/flutter/issues/40101 - AndroidSemanticsAction.accessibilityFocus, + if (item == popupItems.first) AndroidSemanticsAction.clearAccessibilityFocus, + if (item != popupItems.first) AndroidSemanticsAction.accessibilityFocus, + AndroidSemanticsAction.click, ], ), reason: "Popup $item doesn't have the right semantics"); @@ -395,9 +394,10 @@ void main() { isFocusable: true, actions: [ // TODO(gspencergoog): This should really be clearAccessibilityFocus, - // but TalkBack doesn't find it for some reason. + // but TalkBack doesn't focus it the second time for some reason. // https://github.com/flutter/flutter/issues/40101 AndroidSemanticsAction.accessibilityFocus, + AndroidSemanticsAction.click, ], ), reason: "Popup $item doesn't have the right semantics the second time");