From e00a2711120a0ed5ee56c66f872a29eb5aa4da34 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 30 May 2017 16:53:10 -0700 Subject: [PATCH] [iOS accessibility] Dispatch taps to selected element (flutter/engine#3718) Previously, taps were sent to the topmost tap handler in the center of the accessibility frame of the selected element nd therefore might have been handled by a different element than the desired one. --- .../darwin/ios/framework/Source/accessibility_bridge.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm index 15c1bfa7c6..6d67b942b6 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm @@ -173,8 +173,10 @@ blink::SemanticsAction GetSemanticsActionForScrollDirection( #pragma mark - UIAccessibilityAction overrides - (BOOL)accessibilityActivate { - // TODO(tvolkert): Implement - return NO; + if (!_node.HasAction(blink::SemanticsAction::kTap)) + return NO; + _bridge->DispatchSemanticsAction(_uid, blink::SemanticsAction::kTap); + return YES; } - (void)accessibilityIncrement {