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.
This commit is contained in:
committed by
GitHub
parent
e1cadccf79
commit
b357c2dc67
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user