Diff
Modified: trunk/LayoutTests/ChangeLog (168431 => 168432)
--- trunk/LayoutTests/ChangeLog 2014-05-07 18:24:21 UTC (rev 168431)
+++ trunk/LayoutTests/ChangeLog 2014-05-07 18:32:06 UTC (rev 168432)
@@ -1,3 +1,13 @@
+2014-05-07 Chris Fleizach <cfleiz...@apple.com>
+
+ AX: aria-expanded changes are not communicated to clients
+ https://bugs.webkit.org/show_bug.cgi?id=132642
+
+ Reviewed by Mario Sanchez Prada.
+
+ * platform/mac/accessibility/expanded-notification-expected.txt: Added.
+ * platform/mac/accessibility/expanded-notification.html: Added.
+
2014-05-07 Christophe Dumez <ch.du...@samsung.com>
[HTML] Default argument to HTMLTableElement.insertRow() should be -1
Added: trunk/LayoutTests/platform/mac/accessibility/expanded-notification-expected.txt (0 => 168432)
--- trunk/LayoutTests/platform/mac/accessibility/expanded-notification-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/expanded-notification-expected.txt 2014-05-07 18:32:06 UTC (rev 168432)
@@ -0,0 +1,15 @@
+
+This tests that aria-expanded changes will send notifications.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial expanded status: false
+Received notification: AXExpandedChanged
+Expanded status: true
+Received notification: AXExpandedChanged
+Expanded status: false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/platform/mac/accessibility/expanded-notification.html (0 => 168432)
--- trunk/LayoutTests/platform/mac/accessibility/expanded-notification.html (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/expanded-notification.html 2014-05-07 18:32:06 UTC (rev 168432)
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<div id="content">
+
+<button id="button" aria-expanded="false">
+
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that aria-expanded changes will send notifications.");
+
+ var element = 0;
+ var notification = 0;
+ var notificationCount = 0;
+ function ariaCallback(element, notification) {
+ if (notification == "AXExpandedChanged") {
+ notificationCount++;
+
+ debug("Received notification: " + notification);
+ debug("Expanded status: " + element.isExpanded);
+ if (notificationCount == 2) {
+ accessibilityController.removeNotificationListener();
+ finishJSTest();
+ }
+ }
+ }
+
+ if (window.accessibilityController) {
+ window.jsTestIsAsync = true;
+
+ var addedNotification = accessibilityController.addNotificationListener(ariaCallback);
+ debug("Initial expanded status: " + accessibilityController.accessibleElementById("button").isExpanded);
+
+ setTimeout(function() {
+ document.getElementById("button").setAttribute("aria-expanded", "true");
+ setTimeout(function() {
+ document.getElementById("button").setAttribute("aria-expanded", "false");
+ }, 10);
+ }, 10);
+ }
+
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (168431 => 168432)
--- trunk/Source/WebCore/ChangeLog 2014-05-07 18:24:21 UTC (rev 168431)
+++ trunk/Source/WebCore/ChangeLog 2014-05-07 18:32:06 UTC (rev 168432)
@@ -1,3 +1,21 @@
+2014-05-07 Chris Fleizach <cfleiz...@apple.com>
+
+ AX: aria-expanded changes are not communicated to clients
+ https://bugs.webkit.org/show_bug.cgi?id=132642
+
+ Reviewed by Mario Sanchez Prada.
+
+ When aria-expanded changes on non list/tree items, send out a generic
+ AXExpandedChange notification.
+
+ Test: platform/mac/accessibility/expanded-notification.html
+
+ * accessibility/AXObjectCache.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):
+ * accessibility/mac/AXObjectCacheMac.mm:
+ (WebCore::AXObjectCache::postPlatformNotification):
+
2014-05-07 Alexey Proskuryakov <a...@apple.com>
Release build fix.
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.h (168431 => 168432)
--- trunk/Source/WebCore/accessibility/AXObjectCache.h 2014-05-07 18:24:21 UTC (rev 168431)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.h 2014-05-07 18:32:06 UTC (rev 168432)
@@ -178,6 +178,7 @@
AXRowCountChanged,
AXRowCollapsed,
AXRowExpanded,
+ AXExpandedChanged,
AXInvalidStatusChanged,
AXTextChanged,
AXAriaAttributeChanged,
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (168431 => 168432)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2014-05-07 18:24:21 UTC (rev 168431)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2014-05-07 18:32:06 UTC (rev 168432)
@@ -2329,6 +2329,8 @@
// Post that the specific row either collapsed or expanded.
if (roleValue() == RowRole || roleValue() == TreeItemRole)
cache->postNotification(this, document(), isExpanded() ? AXObjectCache::AXRowExpanded : AXObjectCache::AXRowCollapsed);
+ else
+ cache->postNotification(this, document(), AXObjectCache::AXExpandedChanged);
}
void AccessibilityRenderObject::handleActiveDescendantChanged()
Modified: trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm (168431 => 168432)
--- trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm 2014-05-07 18:24:21 UTC (rev 168431)
+++ trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm 2014-05-07 18:32:06 UTC (rev 168432)
@@ -125,6 +125,9 @@
case AXElementBusyChanged:
macNotification = @"AXElementBusyChanged";
break;
+ case AXExpandedChanged:
+ macNotification = @"AXExpandedChanged";
+ break;
case AXMenuClosed:
macNotification = (id)kAXMenuClosedNotification;
break;