Chromium Code Reviews| Index: ui/accessibility/ax_utils.cc |
| diff --git a/ui/accessibility/ax_utils.cc b/ui/accessibility/ax_utils.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1eea44b66e1c33cc8af9e8c466e09cf70f649f1b |
| --- /dev/null |
| +++ b/ui/accessibility/ax_utils.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_utils.h" |
| + |
| +namespace ui { |
| + |
| +bool IsRoleClickable(AXRole role) { |
|
dmazzoni
2017/02/09 20:24:43
This is fine for now, but @aboxhall may have some
Patti Lor
2017/02/09 23:11:23
Oh, that sounds interesting, thanks for the FYI! I
|
| + switch (role) { |
| + case ui::AX_ROLE_BUTTON: |
|
tapted
2017/02/09 02:45:18
ui:: prefixes not needed
Patti Lor
2017/02/09 23:11:23
Oops, thanks!
|
| + case ui::AX_ROLE_CHECK_BOX: |
| + case ui::AX_ROLE_COLOR_WELL: |
| + case ui::AX_ROLE_DISCLOSURE_TRIANGLE: |
| + case ui::AX_ROLE_IMAGE_MAP_LINK: |
| + case ui::AX_ROLE_LINK: |
| + case ui::AX_ROLE_LIST_BOX_OPTION: |
| + case ui::AX_ROLE_MENU_BUTTON: |
| + case ui::AX_ROLE_MENU_ITEM: |
| + case ui::AX_ROLE_MENU_ITEM_CHECK_BOX: |
| + case ui::AX_ROLE_MENU_ITEM_RADIO: |
| + case ui::AX_ROLE_MENU_LIST_OPTION: |
| + case ui::AX_ROLE_MENU_LIST_POPUP: |
| + case ui::AX_ROLE_POP_UP_BUTTON: |
| + case ui::AX_ROLE_RADIO_BUTTON: |
| + case ui::AX_ROLE_SWITCH: |
| + case ui::AX_ROLE_TAB: |
| + case ui::AX_ROLE_TOGGLE_BUTTON: |
| + return true; |
| + default: |
| + return false; |
| + } |
| +} |
| + |
| +} // namespace ui |