| 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 8713c736a3613bee0c0e32bfd6be86cc1dea3d69..dd59e47a195fc2cfeb6c64c49ac0ea93714bd0a9 100644
|
| --- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
|
| +++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
|
| @@ -1065,19 +1065,21 @@ bool AXNodeObject::isRequired() const
|
|
|
| bool AXNodeObject::canSetFocusAttribute() const
|
| {
|
| - Node* node = this->getNode();
|
| + Node* node = getNode();
|
| if (!node)
|
| return false;
|
|
|
| if (isWebArea())
|
| return true;
|
|
|
| + // Children of elements with an aria-activedescendant attribute should be
|
| + // focusable if they have an ARIA role.
|
| + if (ariaRoleAttribute() != UnknownRole && ancestorExposesActiveDescendant())
|
| + return true;
|
| +
|
| // NOTE: It would be more accurate to ask the document whether setFocusedNode() would
|
| // do anything. For example, setFocusedNode() will do nothing if the current focused
|
| // node will not relinquish the focus.
|
| - if (!node)
|
| - return false;
|
| -
|
| if (isDisabledFormControl(node))
|
| return false;
|
|
|
| @@ -1100,6 +1102,15 @@ bool AXNodeObject::canSetValueAttribute() const
|
| return !isReadOnly();
|
| }
|
|
|
| +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() == ListBoxOptionRole && ancestorExposesActiveDescendant())
|
| + return true;
|
| + return AXObject::canSetSelectedAttribute();
|
| +}
|
| +
|
| bool AXNodeObject::canvasHasFallbackContent() const
|
| {
|
| Node* node = this->getNode();
|
|
|