| Index: Source/modules/accessibility/AXNodeObject.cpp
|
| diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp
|
| index d0b033a36e26e356bb0b60c266aab2918a3498f5..f744844570e95d69347c7e780430bfd00aff041c 100644
|
| --- a/Source/modules/accessibility/AXNodeObject.cpp
|
| +++ b/Source/modules/accessibility/AXNodeObject.cpp
|
| @@ -167,15 +167,33 @@ bool AXNodeObject::computeAccessibilityIsIgnored(IgnoredReasons* ignoredReasons)
|
| #endif
|
|
|
| // If this element is within a parent that cannot have children, it should not be exposed.
|
| - if (isDescendantOfLeafNode())
|
| + if (isDescendantOfLeafNode()) {
|
| + if (ignoredReasons)
|
| + ignoredReasons->append(IgnoredReason(AXAncestorIsLeafNode, leafNodeAncestor()));
|
| return true;
|
| + }
|
|
|
| // Ignore labels that are already referenced by a control's title UI element.
|
| AXObject* controlObject = correspondingControlForLabelElement();
|
| - if (controlObject && !controlObject->deprecatedExposesTitleUIElement() && controlObject->isCheckboxOrRadio())
|
| + if (controlObject && !controlObject->deprecatedExposesTitleUIElement() && controlObject->isCheckboxOrRadio()) {
|
| + if (ignoredReasons) {
|
| + HTMLLabelElement* label = labelElementContainer();
|
| + if (label && !label->isSameNode(node())) {
|
| + AXObject* labelAXObject = axObjectCache()->getOrCreate(label);
|
| + ignoredReasons->append(IgnoredReason(AXLabelContainer, labelAXObject));
|
| + }
|
| +
|
| + ignoredReasons->append(IgnoredReason(AXLabelFor, controlObject));
|
| + }
|
| return true;
|
| + }
|
|
|
| - return m_role == UnknownRole;
|
| + if (m_role == UnknownRole) {
|
| + if (ignoredReasons)
|
| + ignoredReasons->append(IgnoredReason(AXUninteresting));
|
| + return true;
|
| + }
|
| + return false;
|
| }
|
|
|
| static bool isListElement(Node* node)
|
|
|