summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-16 16:25:10 +0100
committerBen Murdoch <benm@google.com>2011-05-23 18:54:14 +0100
commitab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb (patch)
treedb769fadd053248f85db67434a5b275224defef7 /Source/WebCore/accessibility/AccessibilityRenderObject.cpp
parent52e2557aeb8477967e97fd24f20f8f407a10fa15 (diff)
downloadexternal_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.zip
external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.gz
external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.bz2
Merge WebKit at r76408: Initial merge by git.
Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53
Diffstat (limited to 'Source/WebCore/accessibility/AccessibilityRenderObject.cpp')
-rw-r--r--Source/WebCore/accessibility/AccessibilityRenderObject.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
index 8b0c5ca..ca8d4a7 100644
--- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -1772,6 +1772,10 @@ bool AccessibilityRenderObject::accessibilityIsIgnored() const
if (!isAllowedChildOfTree())
return true;
+ // Allow the platform to decide if the attachment is ignored or not.
+ if (isAttachment())
+ return accessibilityIgnoreAttachment();
+
// ignore popup menu items because AppKit does
for (RenderObject* parent = m_renderer->parent(); parent; parent = parent->parent()) {
if (parent->isBoxModelObject() && toRenderBoxModelObject(parent)->isMenuList())
@@ -1817,9 +1821,6 @@ bool AccessibilityRenderObject::accessibilityIsIgnored() const
if (ariaRoleAttribute() != UnknownRole)
return false;
- if (!helpText().isEmpty())
- return false;
-
// don't ignore labels, because they serve as TitleUIElements
Node* node = m_renderer->node();
if (node && node->hasTagName(labelTag))
@@ -1877,11 +1878,17 @@ bool AccessibilityRenderObject::accessibilityIsIgnored() const
return false;
}
- // make a platform-specific decision
- if (isAttachment())
- return accessibilityIgnoreAttachment();
+ if (isWebArea() || m_renderer->isListMarker())
+ return false;
+
+ // Using the help text to decide an element's visibility is not as definitive
+ // as previous checks, so this should remain as one of the last.
+ if (!helpText().isEmpty())
+ return false;
- return !m_renderer->isListMarker() && !isWebArea();
+ // By default, objects should be ignored so that the AX hierarchy is not
+ // filled with unnecessary items.
+ return true;
}
bool AccessibilityRenderObject::isLoaded() const