Commit 815bc152 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Creates and uses Save Card Badge A11y hint and Save… strings.

Bug: 1014652
Change-Id: I80d87b3dd0c486d9369fe5b0a9c2981ef027199a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1915187Reviewed-by: default avatarChris Lu <thegreenfrog@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715761}
parent 0f7e4682
......@@ -299,6 +299,12 @@ locale. The strings in this file are specific to iOS.
<message name="IDS_IOS_AUTOFILL_SAVE_CARD" desc="Title for the view for saving a credit card. [Length: 15em] [iOS only]">
Save Card
</message>
<message name="IDS_IOS_AUTOFILL_SAVE_ELLIPSIS" desc="Title for the button that presents the View for Saving a credit card. The ellipsis indicate that a following action (the presentation) will take place. [Length: 10em] [iOS only]">
Save...
</message>
<message name="IDS_IOS_AUTOFILL_SAVE_CARD_BADGE_HINT" desc="Accessibility Hint for the Save Card button which presents the current options to Save a Card. This is spoken by VoiceOver. [Length:Unlimited] [iOS only]">
Options to Save Card
</message>
<message name="IDS_IOS_AUTOFILL_FULLNAME" desc="Title of the field of a profile address representing the full name of the addressee. [Length: 15em] [iOS only]">
Full Name
</message>
......
9d937498cb8814e951afec0b9bdf3993b518b4d9
\ No newline at end of file
......@@ -81,7 +81,8 @@
action:@selector(saveCardBadgeButtonTapped:)
forControlEvents:UIControlEventTouchUpInside];
button.accessibilityIdentifier = kBadgeButtonSaveCardAccessibilityIdentifier;
// TODO(crbug.com/1014652): Create a11y label hint.
button.accessibilityLabel =
l10n_util::GetNSString(IDS_IOS_AUTOFILL_SAVE_CARD_BADGE_HINT);
return button;
}
......
......@@ -61,9 +61,7 @@ const CGFloat kBadgeCornerRadius = 5.0;
break;
case BadgeType::kBadgeTypeSaveCard:
_actionIdentifier = PopupMenuActionShowSaveCardOptions;
// TODO(crbug.com/1014652): Replace with final String. Its currently
// "Save Card" on the delegate and "Save Credit Card on mocks.
_title = @"Save Credit Card";
_title = l10n_util::GetNSString(IDS_IOS_AUTOFILL_SAVE_CARD);
break;
case BadgeType::kBadgeTypeTranslate:
_actionIdentifier = PopupMenuActionShowTranslateOptions;
......
......@@ -65,8 +65,8 @@
presentsModal:self.hasBadge
type:InfobarType::kInfobarTypeSaveCard];
if (self.saveCardInfoBarDelegate->upload()) {
// TODO(crbug.com/1014652): Use real string once its been created.
self.bannerViewController.buttonText = @"Save...";
self.bannerViewController.buttonText =
l10n_util::GetNSString(IDS_IOS_AUTOFILL_SAVE_ELLIPSIS);
} else {
self.bannerViewController.buttonText =
base::SysUTF16ToNSString(self.saveCardInfoBarDelegate->GetButtonLabel(
......
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