Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2202)

Unified Diff: Source/modules/accessibility/AXNodeObject.cpp

Issue 829473004: When ARIA button contains a link, label text is ignored (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.h ('k') | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.h ('k') | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698