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

Unified Diff: content/browser/accessibility/browser_accessibility.cc

Issue 1416873015: Text controls should expose their value instead of their name via IAccessibleText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit tests. Created 5 years, 2 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: content/browser/accessibility/browser_accessibility.cc
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
index 19e4b4b4c94e2945e68a4b2d77bd3e94ab25b8c3..2e4e71e7b7d2c61290abd8d5ec7240d7206ca2c6 100644
--- a/content/browser/accessibility/browser_accessibility.cc
+++ b/content/browser/accessibility/browser_accessibility.cc
@@ -685,32 +685,22 @@ bool BrowserAccessibility::IsWebAreaForPresentationalIframe() const {
return grandparent->GetRole() == ui::AX_ROLE_IFRAME_PRESENTATIONAL;
}
-bool BrowserAccessibility::IsControl() const {
aboxhall 2015/10/29 17:58:49 So this method was never called previously?
+// Some controls (native or ARIA-based) expose a visible value which is
aboxhall 2015/10/29 17:58:49 Put this comment in the header file instead.
+// separate from their name or label.
+// Examples include combo boxes and text fields, but don't include buttons.
+bool BrowserAccessibility::IsControlWithValue() const {
switch (GetRole()) {
- case ui::AX_ROLE_BUTTON:
- case ui::AX_ROLE_BUTTON_DROP_DOWN:
- case ui::AX_ROLE_CHECK_BOX:
case ui::AX_ROLE_COLOR_WELL:
case ui::AX_ROLE_COMBO_BOX:
- case ui::AX_ROLE_DISCLOSURE_TRIANGLE:
+ case ui::AX_ROLE_DATE:
+ case ui::AX_ROLE_DATE_TIME:
+ case ui::AX_ROLE_INPUT_TIME:
case ui::AX_ROLE_LIST_BOX:
- case ui::AX_ROLE_MENU_BAR:
- 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:
- case ui::AX_ROLE_POP_UP_BUTTON:
- case ui::AX_ROLE_RADIO_BUTTON:
case ui::AX_ROLE_SCROLL_BAR:
case ui::AX_ROLE_SEARCH_BOX:
case ui::AX_ROLE_SLIDER:
case ui::AX_ROLE_SPIN_BUTTON:
- case ui::AX_ROLE_SWITCH:
- case ui::AX_ROLE_TAB:
case ui::AX_ROLE_TEXT_FIELD:
- case ui::AX_ROLE_TOGGLE_BUTTON:
- case ui::AX_ROLE_TREE:
return true;
default:
return false;

Powered by Google App Engine
This is Rietveld 408576698