ARIA live regions don't trigger notifications for elements that aren't in the AX...
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jun 2011 17:59:48 +0000 (17:59 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jun 2011 17:59:48 +0000 (17:59 +0000)
commita4afafb33bc1191000ccca5fa294dcbbf391131f
tree2cce4e58bbd1a8e368b8a673c9958b3e42fbf249
parent5909292ad50b9a822844d7c17f03963d6de86c8f
ARIA live regions don't trigger notifications for elements that aren't in the AX tree
https://bugs.webkit.org/show_bug.cgi?id=62289

Reviewed by Darin Adler.

Source/WebCore:

If an ARIA Live region udpates an element that is not in the AX object cache, then the Live region
notification is not sent. To fix this, I think the childrenChanged() method needs to actually create
the appropriate objects, but since that method gets called during a render tree update, we've learned
that it's generally not safe to create objects.

Instead a one shot timer can be fired that will update and create the necessary objects so that the
correct notification can be sent.

Test: platform/mac/accessibility/aria-liveregion-without-element-access.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::AXObjectCache):
(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::childrenUpdateTimerFired):
(WebCore::AXObjectCache::childrenChanged):
* accessibility/AXObjectCache.h:
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::childrenChanged):
* accessibility/AccessibilityMenuList.h:
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::childrenChanged):
* accessibility/AccessibilityMenuListPopup.h:
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::childrenChanged):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::startOfContinuations):
   This changed exposed a case where an object was inlineElementContinuation, but not renderInlined,
   which led to an assert.
(WebCore::AccessibilityRenderObject::updateAccessibilityRole):
(WebCore::AccessibilityRenderObject::childrenChanged):
* accessibility/AccessibilityRenderObject.h:

LayoutTests:

* platform/mac/accessibility/aria-liveregion-without-element-access-expected.txt: Added.
* platform/mac/accessibility/aria-liveregion-without-element-access.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/AXObjectCache.h
Source/WebCore/accessibility/AccessibilityMenuList.cpp
Source/WebCore/accessibility/AccessibilityMenuList.h
Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp
Source/WebCore/accessibility/AccessibilityMenuListPopup.h
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.h