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

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

Issue 2112243004: Ignores ARIA relations (e.g. aria-labelledby) that point to an invisible target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed invisible to hidden to match ARIA Implementation Guide. Created 4 years, 5 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
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 176a48c22a4dae8e21ccf8f2e1964df99cea1061..0fac0ed59fead26b13e612665f76aace87a369f7 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -571,15 +571,18 @@ AccessibilityRole AXNodeObject::determineAriaRoleAttribute() const
return UnknownRole;
}
-void AXNodeObject::accessibilityChildrenFromAttribute(QualifiedName attr, AXObject::AXObjectVector& children) const
+void AXNodeObject::accessibilityChildrenFromAttribute(QualifiedName attr, AXObject::AXObjectVector& children, bool includeHiddenObjects) const
{
HeapVector<Member<Element>> elements;
elementsFromAttribute(elements, attr);
AXObjectCacheImpl& cache = axObjectCache();
for (const auto& element : elements) {
- if (AXObject* child = cache.getOrCreate(element))
+ if (AXObject* child = cache.getOrCreate(element)) {
+ if (!includeHiddenObjects && child->isHiddenForTextAlternativeCalculation())
aboxhall 2016/07/08 17:12:35 Why not just call child->accessibilityIsIgnored()
+ continue;
children.append(child);
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698