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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp

Issue 2886243002: Multiselectable touchups for ARIA widgets (Closed)
Patch Set: Fix tests Created 3 years, 7 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 | « third_party/WebKit/Source/modules/accessibility/AXARIAGrid.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
index 236cd2a75507caac6b60a0d39cdfb15fc718853a..ba5fefbb28f359c9e93255d22fc3a765c3088893 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -1047,14 +1047,26 @@ bool AXNodeObject::IsMeter() const {
}
bool AXNodeObject::IsMultiSelectable() const {
- bool multiselectable = false;
- if (HasAOMPropertyOrARIAAttribute(AOMBooleanProperty::kMultiselectable,
- multiselectable)) {
- return multiselectable;
+ switch (RoleValue()) {
+ case kGridRole:
+ case kTreeGridRole:
+ case kTreeRole:
+ case kListBoxRole:
+ case kTabListRole: {
+ bool multiselectable = false;
+ if (HasAOMPropertyOrARIAAttribute(AOMBooleanProperty::kMultiselectable,
+ multiselectable)) {
+ return multiselectable;
+ }
+
+ return isHTMLSelectElement(GetNode()) &&
dmazzoni 2017/05/19 19:40:56 I'm not sure this covers all of the possible roles
+ toHTMLSelectElement(*GetNode()).IsMultiple();
+ }
+ default:
+ break;
}
- return isHTMLSelectElement(GetNode()) &&
- toHTMLSelectElement(*GetNode()).IsMultiple();
+ return false;
}
bool AXNodeObject::IsNativeCheckboxOrRadio() const {
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXARIAGrid.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698