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

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

Issue 2931503002: [Payments] Improve some accessibility labels in editors (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 | « chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc ('k') | 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/editor_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/editor_view_controller.cc b/chrome/browser/ui/views/payments/editor_view_controller.cc
index 40b4fc8981bc3fbefe945af24c90333e35ad4dcd..e96c4ac2a738ebca7c6ce3b00cee28a39478bbcb 100644
--- a/chrome/browser/ui/views/payments/editor_view_controller.cc
+++ b/chrome/browser/ui/views/payments/editor_view_controller.cc
@@ -207,6 +207,7 @@ EditorViewController::CreateComboboxForField(const EditorField& field) {
base::MakeUnique<ValidatingCombobox>(GetComboboxModelForType(field.type),
CreateValidationDelegate(field));
base::string16 initial_value = GetInitialValueForType(field.type);
+ combobox->SetAccessibleName(field.label);
if (!initial_value.empty()) {
combobox->SelectValue(initial_value);
combobox->SetInvalid(!combobox->IsValid());
@@ -374,6 +375,7 @@ views::View* EditorViewController::CreateInputField(views::GridLayout* layout,
// Set the initial value and validity state.
base::string16 initial_value = GetInitialValueForType(field.type);
text_field->SetText(initial_value);
+ text_field->SetAccessibleName(field.label);
*valid = text_field->IsValid();
if (!initial_value.empty())
text_field->SetInvalid(!(*valid));
« no previous file with comments | « chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698