diff options
Diffstat (limited to 'WebCore/accessibility/mac/AccessibilityObjectMac.mm')
| -rw-r--r-- | WebCore/accessibility/mac/AccessibilityObjectMac.mm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/WebCore/accessibility/mac/AccessibilityObjectMac.mm b/WebCore/accessibility/mac/AccessibilityObjectMac.mm index 217af54..722b03e 100644 --- a/WebCore/accessibility/mac/AccessibilityObjectMac.mm +++ b/WebCore/accessibility/mac/AccessibilityObjectMac.mm @@ -43,6 +43,24 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const { + // Determine if this is in a tree. If so, we apply special behavior to make it work like an AXOutline. + AccessibilityObject* axObj = parentObject(); + bool isInTree = false; + while (axObj) { + if (axObj->isTree()) { + isInTree = true; + break; + } + axObj = axObj->parentObjectUnignored(); + } + + // If the object is in a tree, only tree items should be exposed (and the children of tree items). + if (isInTree) { + AccessibilityRole role = roleValue(); + if (role != TreeItemRole && role != StaticTextRole) + return IgnoreObject; + } + return DefaultBehavior; } |
