Commit ef290da1 authored by Robbie Gibson's avatar Robbie Gibson Committed by Commit Bot

[iOS] Add accessibility labels to text zoom buttons

Because the buttons show images, VoiceOver was reading the image
filename. There should be a real label instead.

Bug: 1028938
Change-Id: I3fdcb3e325460616d935cc594f4a7489ebbb033f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078474
Commit-Queue: Robbie Gibson <rkgibson@google.com>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745099}
parent bcea03c2
......@@ -1915,6 +1915,12 @@ Your data was encrypted with your sync passphrase on <ph name="TIME">$2<ex>Sept
<message name="IDS_IOS_REVIEW_UPDATED_CHROME_TOS" desc="Text displayed on the New Tab Page to notify users of upcoming changes to the Terms of Serice">
Chrome’s Terms of Service are changing March 31. <ph name="BEGIN_LINK"><ex>BEGIN_LINK</ex>BEGIN_LINK</ph>Please review<ph name="END_LINK"><ex>END_LINK</ex>END_LINK</ph>
</message>
<message name="IDS_IOS_TEXT_ZOOM_ZOOM_IN" desc="Accessibility label for a button allowing the user to zoom in." meaning="User is asking page to zoom in">
Zoom In
</message>
<message name="IDS_IOS_TEXT_ZOOM_ZOOM_OUT" desc="Accessibility label for a button allowing the user to zoom out." meaning="User is asking page to zoom out">
Zoom Out
</message>
<message name="IDS_IOS_TOOLBAR_CLOSE_MENU" desc="The accessibility label for the toolbar close settings menu button [iOS only].">
Close Menu
</message>
......
......@@ -136,6 +136,8 @@ const CGFloat kDividerWidth = 1;
if (!_incrementButton) {
_incrementButton = [self newButtonWithDefaultStyling];
UIImage* image = [UIImage imageNamed:@"text_zoom_zoom_in"];
image.accessibilityLabel =
l10n_util::GetNSString(IDS_IOS_TEXT_ZOOM_ZOOM_IN);
[_incrementButton setImage:image forState:UIControlStateNormal];
[_incrementButton addTarget:self.zoomHandler
action:@selector(zoomIn)
......@@ -154,6 +156,8 @@ const CGFloat kDividerWidth = 1;
if (!_decrementButton) {
_decrementButton = [self newButtonWithDefaultStyling];
UIImage* image = [UIImage imageNamed:@"text_zoom_zoom_out"];
image.accessibilityLabel =
l10n_util::GetNSString(IDS_IOS_TEXT_ZOOM_ZOOM_OUT);
[_decrementButton setImage:image forState:UIControlStateNormal];
[_decrementButton addTarget:self.zoomHandler
action:@selector(zoomOut)
......
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