Index: Source/modules/accessibility/AXNodeObject.cpp |
diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp |
index f60bf63eb7f89e91d50400f4fcd0b0aaa64cd718..b900e3d1796b492fbda7c030eefc36be29420e02 100644 |
--- a/Source/modules/accessibility/AXNodeObject.cpp |
+++ b/Source/modules/accessibility/AXNodeObject.cpp |
@@ -1256,6 +1256,11 @@ static bool shouldUseAccessibilityObjectInnerText(AXObject* obj) |
if (obj->isInertOrAriaHidden()) |
return false; |
+ // If something doesn't expose any children, then we can always take the inner text content. |
+ // This is what we want when someone puts an <a> inside a <button> for example. |
+ if (obj->isDescendantOfBarrenParent()) |
+ return true; |
+ |
// Skip focusable children, so we don't include the text of links and controls. |
if (obj->canSetFocusAttribute()) |
return false; |