AX: Improve ARIA live region reliability by sending notifications when live regions...
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Apr 2014 16:31:15 +0000 (16:31 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Apr 2014 16:31:15 +0000 (16:31 +0000)
commit11416a5b8603297806a5238c251f6f5210af1c4f
tree01cd0a84d84039e7cb0771133d7ece64f3b185fd
parenta2f8cb22e36ba8ab109f85ae0141053d8a7092f4
AX: Improve ARIA live region reliability by sending notifications when live regions are created/shown and hidden/destroyed
https://bugs.webkit.org/show_bug.cgi?id=124381

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Re-organize some code so that when we detect a new node has been created, we can safely determine its live region status.
If it is a live region, we fire off a live region created notification.

Test: platform/mac/accessibility/live-region-creation-notification.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleLiveRegionCreated):
(WebCore::AXObjectCache::childrenChanged):
(WebCore::AXObjectCache::handleAttributeChanged):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::childrenChanged):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::defaultLiveRegionStatusForRole):
(WebCore::AccessibilityObject::liveRegionStatusIsEnabled):
(WebCore::AccessibilityObject::supportsARIALiveRegion):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::ariaLiveRegionStatus):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::ariaLiveRegionStatus):
* accessibility/AccessibilityRenderObject.h:
* accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::postPlatformNotification):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper postLiveRegionCreatedNotification]):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):

LayoutTests:

* platform/mac/accessibility/live-region-creation-notification.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/live-region-creation-notification.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/AXObjectCache.h
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.h
Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.h
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
Source/WebCore/accessibility/mac/AXObjectCacheMac.mm