Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8674)

Unified Diff: chrome/browser/ui/views/payments/payment_sheet_view_controller.cc

Issue 2956473002: [WebPayments] Order Summary a11y (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
index 6bffe3b46abdd8dcb07ff5d531ad1686ab4298d6..d09dd2a73051b4648e885ee300d5d96ffcf85941 100644
--- a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
+++ b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
@@ -327,11 +327,8 @@ class PaymentSheetRowBuilder {
base::MakeUnique<PreviewEliderLabel>(preview_text, format_string, n,
STYLE_HINT);
content_view->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- base::string16 accessible_content =
- content_view->CreateElidedString(std::numeric_limits<int>::max());
- return AccessibleContent(accessible_content)
- .CreateWithButton(std::move(content_view), button_string,
- button_enabled);
+ return CreateWithButton(std::move(content_view), button_string,
+ button_enabled);
}
private:
@@ -672,10 +669,9 @@ std::unique_ptr<views::Button> PaymentSheetViewController::CreateShippingRow() {
GetShippingAddressLabelFormAutofillProfile(
*state()->shipping_profiles()[0],
state()->GetApplicationLocale());
- return builder.AccessibleContent(truncated_content)
- .CreateWithButton(truncated_content,
- l10n_util::GetStringUTF16(IDS_CHOOSE),
- /*button_enabled=*/true);
+ return builder.CreateWithButton(truncated_content,
+ l10n_util::GetStringUTF16(IDS_CHOOSE),
+ /*button_enabled=*/true);
} else {
base::string16 format = l10n_util::GetPluralStringFUTF16(
IDS_PAYMENT_REQUEST_SHIPPING_ADDRESSES_PREVIEW,
@@ -734,7 +730,8 @@ PaymentSheetViewController::CreatePaymentMethodRow() {
selected_instrument->GetLabel());
card_icon_view->SetImageSize(gfx::Size(32, 20));
- return builder.Id(DialogViewID::PAYMENT_SHEET_PAYMENT_METHOD_SECTION)
+ return builder.AccessibleContent(selected_instrument->GetLabel())
+ .Id(DialogViewID::PAYMENT_SHEET_PAYMENT_METHOD_SECTION)
.CreateWithChevron(std::move(content_view), std::move(card_icon_view));
} else {
builder.Id(DialogViewID::PAYMENT_SHEET_PAYMENT_METHOD_SECTION_BUTTON);
@@ -809,10 +806,9 @@ PaymentSheetViewController::CreateContactInfoRow() {
{autofill::NAME_FULL, autofill::PHONE_HOME_WHOLE_NUMBER,
autofill::EMAIL_ADDRESS},
3, state()->GetApplicationLocale());
- return builder.AccessibleContent(truncated_content)
- .CreateWithButton(truncated_content,
- l10n_util::GetStringUTF16(IDS_CHOOSE),
- /*button_enabled=*/true);
+ return builder.CreateWithButton(truncated_content,
+ l10n_util::GetStringUTF16(IDS_CHOOSE),
+ /*button_enabled=*/true);
} else {
base::string16 preview =
state()->contact_profiles()[0]->ConstructInferredLabel(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698