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 0e68691113381ecaef9955e8a2d8d8af865009b7..e27b54f495c82e0c75f2e48d521be16364cd9e35 100644 |
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp |
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp |
@@ -1649,8 +1649,12 @@ String AXNodeObject::textFromDescendants(AXObjectSet& visited, bool recursive) c |
children.append(ownedChild); |
for (AXObject* child : children) { |
- // Skip hidden children |
- if (child->isInertOrAriaHidden()) |
+ // Don't recurse into children that are explicitly marked as aria-hidden. |
+ // Note that we don't call isInertOrAriaHidden because that would return true |
+ // if any ancestor is hidden, but we need to be able to compute the accessible |
+ // name of object inside hidden subtrees (for example, if aria-labelledby points |
+ // to an object that's hidden). |
+ if (equalIgnoringCase(child->getAttribute(aria_hiddenAttr), "true")) |
continue; |
// If we're going between two layoutObjects that are in separate LayoutBoxes, add |