From b357c2dc67447bf26aae41f0560d8d5544d6b3cf Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 23 May 2017 14:50:26 -0700 Subject: [PATCH] Use children's labels if element doesn't have one (flutter/engine#3709) Android seems to do this by default. This way, if you select a table cell it will read the content of that cell. --- .../darwin/ios/framework/Source/accessibility_bridge.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 c2e1f10dc6..15c1bfa7c6 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 @@ -96,7 +96,12 @@ blink::SemanticsAction GetSemanticsActionForScrollDirection( - (NSString*)accessibilityLabel { if (_node.label.empty()) { - return nil; + NSMutableString *label = [NSMutableString string]; + for (auto& child : _children) { + [label appendString: [child accessibilityLabel]]; + [label appendString: @"\n"]; + } + return label; } return @(_node.label.data()); }