| Index: third_party/WebKit/Source/modules/accessibility/AXObject.cpp
|
| diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
|
| index 1671402dcd5fb2400ead7a92e9c4bf9a26b00e83..ace38e51f555c17a2f21657d599dc3c88ddebcbb 100644
|
| --- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
|
| +++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
|
| @@ -30,6 +30,7 @@
|
|
|
| #include "SkMatrix44.h"
|
| #include "core/css/resolver/StyleResolver.h"
|
| +#include "core/dom/AccessibleNode.h"
|
| #include "core/dom/DocumentUserGestureToken.h"
|
| #include "core/editing/EditingUtilities.h"
|
| #include "core/editing/VisibleUnits.h"
|
| @@ -378,6 +379,15 @@ bool AXObject::isDetached() const {
|
| return !m_axObjectCache;
|
| }
|
|
|
| +const AtomicString& AXObject::getAOMPropertyOrARIAAttribute(
|
| + AOMStringProperty property) const {
|
| + Node* node = this->getNode();
|
| + if (!node || !node->isElementNode())
|
| + return nullAtom;
|
| +
|
| + return AccessibleNode::getProperty(toElement(node), property);
|
| +}
|
| +
|
| bool AXObject::isARIATextControl() const {
|
| return ariaRoleAttribute() == TextFieldRole ||
|
| ariaRoleAttribute() == SearchBoxRole ||
|
| @@ -803,7 +813,8 @@ String AXObject::ariaTextAlternative(bool recursive,
|
| nameSources->push_back(NameSource(*foundTextAlternative, aria_labelAttr));
|
| nameSources->back().type = nameFrom;
|
| }
|
| - const AtomicString& ariaLabel = getAttribute(aria_labelAttr);
|
| + const AtomicString& ariaLabel =
|
| + getAOMPropertyOrARIAAttribute(AOMStringProperty::kLabel);
|
| if (!ariaLabel.isEmpty()) {
|
| textAlternative = ariaLabel;
|
|
|
|
|