mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
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.
This commit is contained in:
committed by
GitHub
parent
69b75b5810
commit
6187779e9c
@@ -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