From 6187779e9c3c2c78beb371aef632114c25f400a2 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 (#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/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm b/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm index c2e1f10dc..15c1bfa7c 100644 --- a/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm +++ b/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()); }