Title: [97627] trunk
- Revision
- 97627
- Author
- [email protected]
- Date
- 2011-10-17 09:47:37 -0700 (Mon, 17 Oct 2011)
Log Message
AX: webkit won't always send live region notifications
https://bugs.webkit.org/show_bug.cgi?id=70030
Source/WebCore:
Webkit purposefully does not send live region notifications if some AT client has not accessed the AX tree in between
the last live region update (ostensibly to improve performance).
However, this is problematic if a screen reader misses one notification... it has no idea what happened and the only
recourse is to rescan the page for changes. The correct thing to do is to always send notifications.
Reviewed by Darin Adler.
Test: platform/mac/accessibility/aria-liveregions-notifications-always-sent.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::childrenChanged):
LayoutTests:
Reviewed by Darin Adler.
* platform/mac/accessibility/aria-liveregions-notifications-always-sent-expected.txt: Added.
* platform/mac/accessibility/aria-liveregions-notifications-always-sent.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (97626 => 97627)
--- trunk/LayoutTests/ChangeLog 2011-10-17 16:26:59 UTC (rev 97626)
+++ trunk/LayoutTests/ChangeLog 2011-10-17 16:47:37 UTC (rev 97627)
@@ -1,3 +1,13 @@
+2011-10-17 Chris Fleizach <[email protected]>
+
+ AX: webkit won't always send live region notifications
+ https://bugs.webkit.org/show_bug.cgi?id=70030
+
+ Reviewed by Darin Adler.
+
+ * platform/mac/accessibility/aria-liveregions-notifications-always-sent-expected.txt: Added.
+ * platform/mac/accessibility/aria-liveregions-notifications-always-sent.html: Added.
+
2011-10-17 Darin Adler <[email protected]>
Cleared a stray executable bit.
Added: trunk/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent-expected.txt (0 => 97627)
--- trunk/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent-expected.txt 2011-10-17 16:47:37 UTC (rev 97627)
@@ -0,0 +1,11 @@
+Test test0test1test2
+This tests that ARIA live region notifications are sent even when an assistive technology is not accessing them directly on each update.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS addedNotification is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent.html (0 => 97627)
--- trunk/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent.html (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-liveregions-notifications-always-sent.html 2011-10-17 16:47:37 UTC (rev 97627)
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script>
+var successfullyParsed = false;
+</script>
+<script src=""
+</head>
+<body id="body">
+
+<div role="group" tabindex=0 id="liveregion" aria-live="polite" aria-relevant="additions">
+Test
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that ARIA live region notifications are sent even when an assistive technology is not accessing them directly on each update.");
+
+ if (window.accessibilityController) {
+ window.layoutTestController.waitUntilDone();
+
+ document.getElementById("liveregion").focus();
+ liveRegion = window.accessibilityController.focusedElement;
+
+ var liveRegionChangeCount = 0;
+ function ariaCallback(notification) {
+ if (notification == "AXLiveRegionChanged") {
+ liveRegionChangeCount++;
+ if (liveRegionChangeCount == 3) {
+ liveRegion.removeNotificationListener();
+ window.layoutTestController.notifyDone();
+ }
+ }
+ }
+ var addedNotification = liveRegion.addNotificationListener(ariaCallback);
+ shouldBe("addedNotification", "true");
+
+ // this should trigger our live region callback for a new element.
+ for (var k = 0; k < 3; k++) {
+ var textNode = document.createTextNode("test" + k);
+ document.getElementById("liveregion").appendChild(textNode);
+ }
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (97626 => 97627)
--- trunk/Source/WebCore/ChangeLog 2011-10-17 16:26:59 UTC (rev 97626)
+++ trunk/Source/WebCore/ChangeLog 2011-10-17 16:47:37 UTC (rev 97627)
@@ -1,3 +1,20 @@
+2011-10-17 Chris Fleizach <[email protected]>
+
+ AX: webkit won't always send live region notifications
+ https://bugs.webkit.org/show_bug.cgi?id=70030
+
+ Webkit purposefully does not send live region notifications if some AT client has not accessed the AX tree in between
+ the last live region update (ostensibly to improve performance).
+ However, this is problematic if a screen reader misses one notification... it has no idea what happened and the only
+ recourse is to rescan the page for changes. The correct thing to do is to always send notifications.
+
+ Reviewed by Darin Adler.
+
+ Test: platform/mac/accessibility/aria-liveregions-notifications-always-sent.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::childrenChanged):
+
2011-10-12 Pavel Podivilov <[email protected]>
Web Inspector: fix handling of source mapping entries with no mapping.
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (97626 => 97627)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2011-10-17 16:26:59 UTC (rev 97626)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2011-10-17 16:47:37 UTC (rev 97627)
@@ -3423,20 +3423,18 @@
sentChildrenChanged = true;
}
- // Only do work if the children haven't been marked dirty. This has the effect of blocking
- // future live region change notifications until the AX tree has been accessed again. This
- // is a good performance win for all parties.
- if (!axParent->needsToUpdateChildren()) {
- axParent->setNeedsToUpdateChildren();
-
- // If this element supports ARIA live regions, then notify the AT of changes.
- if (axParent->supportsARIALiveRegion())
- axObjectCache()->postNotification(axParent->renderer(), AXObjectCache::AXLiveRegionChanged, true);
+ axParent->setNeedsToUpdateChildren();
+
+ // These notifications always need to be sent because screenreaders are reliant on them to perform.
+ // In other words, they need to be sent even when the screen reader has not accessed this live region since the last update.
- // If this element is an ARIA text control, notify the AT of changes.
- if (axParent->isARIATextControl() && !axParent->isNativeTextControl() && !axParent->node()->isContentEditable())
- axObjectCache()->postNotification(axParent->renderer(), AXObjectCache::AXValueChanged, true);
- }
+ // If this element supports ARIA live regions, then notify the AT of changes.
+ if (axParent->supportsARIALiveRegion())
+ axObjectCache()->postNotification(axParent->renderer(), AXObjectCache::AXLiveRegionChanged, true);
+
+ // If this element is an ARIA text control, notify the AT of changes.
+ if (axParent->isARIATextControl() && !axParent->isNativeTextControl() && !axParent->node()->isContentEditable())
+ axObjectCache()->postNotification(axParent->renderer(), AXObjectCache::AXValueChanged, true);
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes