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

Unified Diff: ui/accessibility/ax_role_properties.cc

Issue 2671563002: MacViews: Implement NSAccessibilityPressAction for Views with clickable roles. (Closed)
Patch Set: Add TODO for "feed" ARIA role. Created 3 years, 10 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 | « ui/accessibility/ax_role_properties.h ('k') | ui/accessibility/platform/ax_platform_node_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_role_properties.cc
diff --git a/ui/accessibility/ax_role_properties.cc b/ui/accessibility/ax_role_properties.cc
new file mode 100644
index 0000000000000000000000000000000000000000..aa712fab75c74cca9a6860cf1e87e7914645beb6
--- /dev/null
+++ b/ui/accessibility/ax_role_properties.cc
@@ -0,0 +1,35 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/accessibility/ax_role_properties.h"
+
+namespace ui {
+
+bool IsRoleClickable(AXRole role) {
+ switch (role) {
+ case AX_ROLE_BUTTON:
+ case AX_ROLE_CHECK_BOX:
+ case AX_ROLE_COLOR_WELL:
+ case AX_ROLE_DISCLOSURE_TRIANGLE:
+ case AX_ROLE_IMAGE_MAP_LINK:
+ case AX_ROLE_LINK:
+ case AX_ROLE_LIST_BOX_OPTION:
+ case AX_ROLE_MENU_BUTTON:
+ case AX_ROLE_MENU_ITEM:
+ case AX_ROLE_MENU_ITEM_CHECK_BOX:
+ case AX_ROLE_MENU_ITEM_RADIO:
+ case AX_ROLE_MENU_LIST_OPTION:
+ case AX_ROLE_MENU_LIST_POPUP:
+ case AX_ROLE_POP_UP_BUTTON:
+ case AX_ROLE_RADIO_BUTTON:
+ case AX_ROLE_SWITCH:
+ case AX_ROLE_TAB:
+ case AX_ROLE_TOGGLE_BUTTON:
+ return true;
+ default:
+ return false;
+ }
+}
+
+} // namespace ui
« no previous file with comments | « ui/accessibility/ax_role_properties.h ('k') | ui/accessibility/platform/ax_platform_node_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698