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

Unified Diff: ui/views/controls/combobox/combobox.cc

Issue 2946783003: Views a11y: Use AX_ROLE_POP_UP_BUTTON for views::Combobox. (Closed)
Patch Set: Comment 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: ui/views/controls/combobox/combobox.cc
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index c948d755e62f839487c7238641e7cb9c17e87a30..615318fe42c1d7e1a549b7f3fbd8387b5a41eb3f 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -751,7 +751,11 @@ void Combobox::OnBlur() {
}
void Combobox::GetAccessibleNodeData(ui::AXNodeData* node_data) {
- node_data->role = ui::AX_ROLE_COMBO_BOX;
+ // AX_ROLE_COMBO_BOX is for UI elements with a dropdown and an editable text
+ // field, which views::Combobox does not have. Use AX_ROLE_POP_UP_BUTTON to
+ // match an HTML <select> element.
+ node_data->role = ui::AX_ROLE_POP_UP_BUTTON;
+
node_data->SetName(accessible_name_);
node_data->SetValue(model_->GetItemAt(selected_index_));
if (enabled()) {
« 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