Commit 79a9f7a9 authored by Chris Lu's avatar Chris Lu Committed by Commit Bot

[ios] Add accessibility label to Infobarbadge button

Bug: 954624
Change-Id: I24cff48293ad2943f42fa5e305274c2c7389c8e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1597112
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658388}
parent 6290df1f
......@@ -789,6 +789,9 @@ locale. The strings in this file are specific to iOS.
<message name="IDS_IOS_ICON_SEARCH" desc="Accessibility label for the search icon [iOS only].">
Search
</message>
<message name="IDS_IOS_INFOBAR_BADGES_PASSWORD_HINT" desc="The iOS infobar badge item for saving password credentials [Length:Unlimited]">
Options to Save Password
</message>
<message name="IDS_IOS_INSPECT_UI_CONSOLE_NOTICE" desc="The message at the top of the debugging page which displays JavaScript console logs [iOS only].">
Tap the "Start Logging" button to collect future JavaScript console logs and errors from all tabs. Logs will be collected (and stored only in memory) until this page is closed or "Stop Logging" is tapped.
</message>
......
......@@ -251,11 +251,19 @@ const CGFloat kButtonTrailingSpacing = 10;
// Setup accessibility.
_trailingButton.isAccessibilityElement = YES;
if (IsInfobarUIRebootEnabled()) {
_leadingButton.isAccessibilityElement = YES;
_leadingButton.accessibilityLabel =
l10n_util::GetNSString(IDS_IOS_INFOBAR_BADGES_PASSWORD_HINT);
}
_locationButton.isAccessibilityElement = YES;
_locationButton.accessibilityLabel =
l10n_util::GetNSString(IDS_ACCNAME_LOCATION);
_accessibleElements = [[NSMutableArray alloc] init];
if (IsInfobarUIRebootEnabled()) {
[_accessibleElements addObject:_leadingButton];
}
[_accessibleElements addObject:_locationButton];
[_accessibleElements addObject:_trailingButton];
......
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