Commit 55dbaf62 authored by Robbie Gibson's avatar Robbie Gibson Committed by Commit Bot

[iOS] Improve Voice Control names for cells

Before, the Voice Control name for these cells would be all the text
in the cell:
 - URL cell: Both the title (bookmark name, website name, etc.) and
   the url itself.
 - Image cell/account cell: Both the title and detail text.

This is confusing and contributes to name clutter on the Voice
Control "Show Names" screen. Just the title is a much better name.

Bug: 1004319
Change-Id: I179747b0162a1a1cf8102df786167d9846836592
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1856162
Commit-Queue: Robbie Gibson <rkgibson@google.com>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarJérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705499}
parent 0133eacd
......@@ -267,4 +267,13 @@ const CGFloat kHorizontalErrorIconFixedSize = 25;
return self.detailTextLabel.text;
}
- (NSArray<NSString*>*)accessibilityUserInputLabels {
NSMutableArray<NSString*>* userInputLabels = [[NSMutableArray alloc] init];
if (self.textLabel.text) {
[userInputLabels addObject:self.textLabel.text];
}
return userInputLabels;
}
@end
......@@ -195,4 +195,13 @@
return accessibilityTraits;
}
- (NSArray<NSString*>*)accessibilityUserInputLabels {
NSMutableArray<NSString*>* userInputLabels = [[NSMutableArray alloc] init];
if (self.textLabel.text) {
[userInputLabels addObject:self.textLabel.text];
}
return userInputLabels;
}
@end
......@@ -303,6 +303,15 @@ const char kDefaultSupplementalURLTextDelimiter[] = "•";
}
}
- (NSArray<NSString*>*)accessibilityUserInputLabels {
NSMutableArray<NSString*>* userInputLabels = [[NSMutableArray alloc] init];
if (self.titleLabel.text) {
[userInputLabels addObject:self.titleLabel.text];
}
return userInputLabels;
}
- (NSString*)accessibilityIdentifier {
return self.titleLabel.text;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment