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

Unified Diff: chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc

Issue 2694903010: AX checked state changes (Closed)
Patch Set: git cl try Created 3 years, 8 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: chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
diff --git a/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc b/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
index 4534fcd7e1d0294f8771b60c149038fe2c6192b2..ef70c62d03ad1a429e1c638d9af43e19a82c47b0 100644
--- a/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
+++ b/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
@@ -178,7 +178,6 @@ void PopulateAXState(arc::mojom::AccessibilityNodeInfoData* node,
// sources.
// The FOCUSABLE state is not mapped because Android places focusability on
// many ancestor nodes.
- MAP_STATE(AXBooleanProperty::CHECKED, ui::AX_STATE_CHECKED);
MAP_STATE(AXBooleanProperty::EDITABLE, ui::AX_STATE_EDITABLE);
MAP_STATE(AXBooleanProperty::MULTI_LINE, ui::AX_STATE_MULTILINE);
MAP_STATE(AXBooleanProperty::PASSWORD, ui::AX_STATE_PROTECTED);
@@ -186,6 +185,14 @@ void PopulateAXState(arc::mojom::AccessibilityNodeInfoData* node,
#undef MAP_STATE
+ if (GetBooleanProperty(node, AXBooleanProperty::CHECKABLE)) {
+ const bool is_checked =
+ GetBooleanProperty(node, AXBooleanProperty::CHECKED);
+ const ui::AXCheckedState checked_state =
+ is_checked ? ui::AX_CHECKED_STATE_TRUE : ui::AX_CHECKED_STATE_FALSE;
+ out_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state);
+ }
+
if (!GetBooleanProperty(node, AXBooleanProperty::ENABLED))
out_data->AddStateFlag(ui::AX_STATE_DISABLED);
}
« no previous file with comments | « ash/system/tray/hover_highlight_view.cc ('k') | chrome/browser/resources/chromeos/chromevox/common/aria_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698