| 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 e78144777075ab7f939e9f2715413e7a0a349b5f..01b64c421687714597d3fddee6a4d0eff0618829 100644
|
| --- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
|
| +++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
|
| @@ -63,6 +63,7 @@
|
| #include "core/layout/LayoutObject.h"
|
| #include "core/svg/SVGElement.h"
|
| #include "modules/accessibility/AXObjectCacheImpl.h"
|
| +#include "modules/accessibility/AccessibleNode.h"
|
| #include "platform/UserGestureIndicator.h"
|
| #include "platform/text/PlatformLocale.h"
|
| #include "wtf/text/StringBuilder.h"
|
| @@ -615,7 +616,8 @@ AccessibilityRole AXNodeObject::nativeAccessibilityRoleIgnoringAria() const {
|
| return IgnoredRole;
|
|
|
| if (isHTMLIFrameElement(*getNode())) {
|
| - const AtomicString& ariaRole = getAttribute(roleAttr);
|
| + const AtomicString& ariaRole =
|
| + getAomPropertyOrAriaAttribute(AomStringProperty::Role);
|
| if (ariaRole == "none" || ariaRole == "presentation")
|
| return IframePresentationalRole;
|
| return IframeRole;
|
| @@ -688,7 +690,8 @@ AccessibilityRole AXNodeObject::determineAccessibilityRole() {
|
| }
|
|
|
| AccessibilityRole AXNodeObject::determineAriaRoleAttribute() const {
|
| - const AtomicString& ariaRole = getAttribute(roleAttr);
|
| + const AtomicString& ariaRole =
|
| + getAomPropertyOrAriaAttribute(AomStringProperty::Role);
|
| if (ariaRole.isNull() || ariaRole.isEmpty())
|
| return UnknownRole;
|
|
|
| @@ -1899,7 +1902,8 @@ bool AXNodeObject::nameFromLabelElement() const {
|
| return false;
|
|
|
| // Step 2C from: http://www.w3.org/TR/accname-aam-1.1
|
| - const AtomicString& ariaLabel = getAttribute(aria_labelAttr);
|
| + const AtomicString& ariaLabel =
|
| + getAomPropertyOrAriaAttribute(AomStringProperty::Label);
|
| if (!ariaLabel.isEmpty())
|
| return false;
|
|
|
| @@ -2833,8 +2837,10 @@ String AXNodeObject::nativeTextAlternative(
|
| nameSources->back().type = nameFrom;
|
| }
|
| if (Element* documentElement = document->documentElement()) {
|
| + AXObject* axDocument = axObjectCache().getOrCreate(documentElement);
|
| + DCHECK(axDocument);
|
| const AtomicString& ariaLabel =
|
| - documentElement->getAttribute(aria_labelAttr);
|
| + axDocument->getAomPropertyOrAriaAttribute(AomStringProperty::Label);
|
| if (!ariaLabel.isEmpty()) {
|
| textAlternative = ariaLabel;
|
|
|
|
|