AX: aria-hidden inheritance broken when applying to some descendants
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Dec 2011 23:54:37 +0000 (23:54 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Dec 2011 23:54:37 +0000 (23:54 +0000)
commitfd50eda0ee8a813eeaeea8a172c0e5e1d67135db
tree7325fa794cc8fa314ab67e39173807e67414c376
parent5d6aefae2347f449ed775ed283fb32902157774d
AX: aria-hidden inheritance broken when applying to some descendants
https://bugs.webkit.org/show_bug.cgi?id=73940

Reviewed by Darin Adler.

Source/WebCore:

When adding children, we were not updating the children cache for direct AX descendants.
This meant that toggling aria-hidden could result in a stale cache where elements would not be reachable.

Making this fix also exposed a problem in AccessibilityTable where the AccessibilityHeaderObject was not
being managed correctly as a mock element.

Test: platform/mac/accessibility/aria-hidden-changes-for-non-ignored-elements.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addChildren):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::clearChildren):
(WebCore::AccessibilityTable::headerContainer):
* accessibility/AccessibilityTable.h:

LayoutTests:

* platform/mac/accessibility/aria-hidden-changes-for-non-ignored-elements-expected.txt: Added.
* platform/mac/accessibility/aria-hidden-changes-for-non-ignored-elements.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/aria-hidden-changes-for-non-ignored-elements-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/aria-hidden-changes-for-non-ignored-elements.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityMockObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityTable.cpp
Source/WebCore/accessibility/AccessibilityTable.h