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

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

Issue 2518183002: Moved action verbs out of Blink. (Closed)
Patch Set: Exposes appropriate state and action names when controls are disabled. Created 4 years, 1 month 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
Index: ui/views/controls/combobox/combobox.cc
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index 852aa5f0fddaa56ee1501cb98c99d538f8f57163..83aab345326780de5c9f092c8fcee3bfc6c384f5 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -740,6 +740,10 @@ void Combobox::GetAccessibleNodeData(ui::AXNodeData* node_data) {
node_data->role = ui::AX_ROLE_COMBO_BOX;
node_data->SetName(accessible_name_);
node_data->SetValue(model_->GetItemAt(selected_index_));
+ if (enabled()) {
+ node_data->AddIntAttribute(ui::AX_ATTR_ACTION,
+ ui::AX_SUPPORTED_ACTION_OPEN);
+ }
node_data->AddIntAttribute(ui::AX_ATTR_POS_IN_SET, selected_index_);
node_data->AddIntAttribute(ui::AX_ATTR_SET_SIZE, model_->GetItemCount());
}
« ui/accessibility/ax_node_data.cc ('K') | « ui/views/controls/button/menu_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698