Commit 58e04035 authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS][MF] Add a11y labels for the accessory icons

Bug: 845472
Change-Id: I47898430b16721084ec836c2d4627ccf1db7c0c3
Reviewed-on: https://chromium-review.googlesource.com/c/1338181Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609288}
parent 20da542f
......@@ -891,6 +891,18 @@ locale. The strings in this file are specific to iOS.
<message name="IDS_IOS_MANUAL_FALLBACK_MANAGE_ADDRESSES" desc="The title for the button in the manual fallback UI that takes the user to the addresses settings. In this screen they see all the addresses and can erase them. [30em]">
Manage Addresses...
</message>
<message name="IDS_IOS_MANUAL_FALLBACK_SHOW_ADDRESSES" desc="Label for the addresses icon in manual fallback. Read by Text To Speech" meaning="Voice Over will read this to the user followed by 'Button' when this button is focused.">
Addresses
</message>
<message name="IDS_IOS_MANUAL_FALLBACK_SHOW_CREDIT_CARDS" desc="Label for the credit cards icon in manual fallback. Read by Text To Speech" meaning="Voice Over will read this to the user followed by 'Button' when this button is focused.">
Credit Cards
</message>
<message name="IDS_IOS_MANUAL_FALLBACK_SHOW_KEYBOARD" desc="Label for the keyboard icon in manual fallback. Read by Text To Speech" meaning="Voice Over will read this to the user followed by 'Button' when this button is focused.">
Keyboard
</message>
<message name="IDS_IOS_MANUAL_FALLBACK_SHOW_PASSWORDS" desc="Label for the password icon in manual fallback. Read by Text To Speech" meaning="Voice Over will read this to the user followed by 'Button' when this button is focused.">
Passwords
</message>
<message name="IDS_IOS_MICROPHONE_USAGE_DESCRIPTION" desc="Specifies the reason for accessing the user's microphone while the app is in use [Length: unlimited] [iOS only].">
This lets you search faster using your voice.
</message>
......
5297586726776d9e39145cccb665e2101d6f7fab
\ No newline at end of file
a535cc7ae4d44ff7243c5c868ce89d5a10a22613
\ No newline at end of file
35e0c0be1452b9f6a49c49f0fd5d8acde4383592
\ No newline at end of file
b3cc773022faae11faa1191f608ea8649fab54b5
\ No newline at end of file
per-file *.sha1=*
# TEAM: ios-directory-owners@chromium.org
# OS: iOS
......@@ -9,6 +9,8 @@
#import "ios/chrome/browser/ui/autofill/manual_fill/uicolor_manualfill.h"
#include "ios/chrome/browser/ui/util/ui_util.h"
#import "ios/chrome/common/ui_util/constraints_ui_util.h"
#include "ios/chrome/grit/ios_strings.h"
#include "ui/base/l10n/l10n_util.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
......@@ -109,6 +111,7 @@ static NSTimeInterval MFAnimationDuration = 0.20;
- (void)loadView {
self.view = [[UIView alloc] init];
self.view.accessibilityViewIsModal = YES;
self.view.translatesAutoresizingMaskIntoConstraints = NO;
UIColor* tintColor = [self activeTintColor];
......@@ -125,6 +128,8 @@ static NSTimeInterval MFAnimationDuration = 0.20;
forControlEvents:UIControlEventTouchUpInside];
self.keyboardButton.accessibilityIdentifier =
manual_fill::AccessoryKeyboardAccessibilityIdentifier;
self.keyboardButton.accessibilityLabel =
l10n_util::GetNSString(IDS_IOS_MANUAL_FALLBACK_SHOW_KEYBOARD);
[icons addObject:self.keyboardButton];
}
......@@ -139,6 +144,8 @@ static NSTimeInterval MFAnimationDuration = 0.20;
self.passwordButton.accessibilityIdentifier =
manual_fill::AccessoryPasswordAccessibilityIdentifier;
self.passwordButton.hidden = self.isPasswordButtonHidden;
self.passwordButton.accessibilityLabel =
l10n_util::GetNSString(IDS_IOS_MANUAL_FALLBACK_SHOW_PASSWORDS);
[icons addObject:self.passwordButton];
if (autofill::features::IsAutofillManualFallbackEnabled()) {
......@@ -153,6 +160,8 @@ static NSTimeInterval MFAnimationDuration = 0.20;
self.cardsButton.accessibilityIdentifier =
manual_fill::AccessoryCreditCardAccessibilityIdentifier;
self.cardsButton.hidden = self.isCreditCardButtonHidden;
self.cardsButton.accessibilityLabel =
l10n_util::GetNSString(IDS_IOS_MANUAL_FALLBACK_SHOW_CREDIT_CARDS);
[icons addObject:self.cardsButton];
self.accountButton = [UIButton buttonWithType:UIButtonTypeSystem];
......@@ -166,6 +175,8 @@ static NSTimeInterval MFAnimationDuration = 0.20;
self.accountButton.accessibilityIdentifier =
manual_fill::AccessoryAddressAccessibilityIdentifier;
self.accountButton.hidden = self.isAddressButtonHidden;
self.accountButton.accessibilityLabel =
l10n_util::GetNSString(IDS_IOS_MANUAL_FALLBACK_SHOW_ADDRESSES);
[icons addObject:self.accountButton];
}
UIStackView* stackView = [[UIStackView alloc] initWithArrangedSubviews:icons];
......
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