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 c50a0bd5fe58a5002fb9ce0c5dd8b0e03c353906..ae82be562a3fabcf24a200ba5c6734bef3c69673 100644 |
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp |
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp |
@@ -1294,11 +1294,13 @@ bool AXNodeObject::CanSetValueAttribute() const { |
} |
bool AXNodeObject::CanSetSelectedAttribute() const { |
- // ARIA list box options can be selected if they are children of an element |
- // with an aria-activedescendant attribute. |
- if (AriaRoleAttribute() == kListBoxOptionRole && |
- AncestorExposesActiveDescendant()) |
+ const AccessibilityRole role = AriaRoleAttribute(); |
+ // These elements can be selected if not disabled (native or ARIA) |
+ if ((role == kListBoxOptionRole || role == kTreeItemRole || |
+ role == kCellRole || role == kTabRole) && |
+ IsEnabled()) { |
dmazzoni
2017/05/19 19:54:04
Do we need to check if the container is enabled or
|
return true; |
+ } |
return AXObjectImpl::CanSetSelectedAttribute(); |
} |