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

Unified Diff: Source/core/accessibility/AXObject.cpp

Issue 51743003: Treat inert nodes as aria-hidden instead of aria-disabled. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 7 years, 2 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/core/accessibility/AXObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXObject.cpp
diff --git a/Source/core/accessibility/AXObject.cpp b/Source/core/accessibility/AXObject.cpp
index 074c7a6c3fcc18cc179b4807dbaef8fc0dcf1f5c..a96bfc7975110cf658f7e7fc2a70b4ee692568f4 100644
--- a/Source/core/accessibility/AXObject.cpp
+++ b/Source/core/accessibility/AXObject.cpp
@@ -278,7 +278,7 @@ AXObjectInclusion AXObject::accessibilityPlatformIncludesObject() const
AXObjectInclusion AXObject::defaultObjectInclusion() const
{
- if (ariaIsHidden())
+ if (isInertOrAriaHidden())
return IgnoreObject;
if (isPresentationalChildOfAriaRole())
@@ -287,6 +287,21 @@ AXObjectInclusion AXObject::defaultObjectInclusion() const
return accessibilityPlatformIncludesObject();
}
+bool AXObject::isInertOrAriaHidden() const
+{
+ if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "true"))
+ return true;
+ if (node() && node()->isInert())
+ return true;
+
+ for (AXObject* object = parentObject(); object; object = object->parentObject()) {
+ if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true"))
+ return true;
+ }
+
+ return false;
+}
+
bool AXObject::lastKnownIsIgnoredValue()
{
if (m_lastKnownIsIgnoredValue == DefaultBehavior)
@@ -896,17 +911,4 @@ AccessibilityRole AXObject::buttonRoleType() const
return ButtonRole;
}
-bool AXObject::ariaIsHidden() const
-{
- if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "true"))
- return true;
-
- for (AXObject* object = parentObject(); object; object = object->parentObject()) {
- if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true"))
- return true;
- }
-
- return false;
-}
-
} // namespace WebCore
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698