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

Unified Diff: ui/views/controls/button/toggle_button.cc

Issue 2694903010: AX checked state changes (Closed)
Patch Set: Test checkbox attribute in automation API, fix whitespace, remove change to third party code Created 3 years, 9 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
Index: ui/views/controls/button/toggle_button.cc
diff --git a/ui/views/controls/button/toggle_button.cc b/ui/views/controls/button/toggle_button.cc
index 7f01ba386e08cbd8878886f7610715453ea79328..451b1ebd0eab650b655f1e4c53ac10fbd3907995 100644
--- a/ui/views/controls/button/toggle_button.cc
+++ b/ui/views/controls/button/toggle_button.cc
@@ -233,8 +233,9 @@ void ToggleButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
CustomButton::GetAccessibleNodeData(node_data);
node_data->role = ui::AX_ROLE_SWITCH;
- if (is_on_)
- node_data->AddStateFlag(ui::AX_STATE_CHECKED);
+ const int checkedState =
dmazzoni 2017/03/09 19:33:41 checked_state
aleventhal 2017/03/09 21:40:49 Done.
+ is_on_ ? ui::AX_CHECKED_STATE_TRUE : ui::AX_CHECKED_STATE_FALSE;
+ node_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checkedState);
}
void ToggleButton::NotifyClick(const ui::Event& event) {

Powered by Google App Engine
This is Rietveld 408576698