[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
cfleizach at apple.com
cfleizach at apple.com
Thu Feb 4 21:22:11 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit d42f3fb0a46c6ffa0cb68a9b69cd9fec3bd92e5d
Author: cfleizach at apple.com <cfleizach at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 20 23:49:19 2010 +0000
WAI-ARIA popup buttons spoken as simply 'button'
https://bugs.webkit.org/show_bug.cgi?id=33922
Reviewed by Beth Dakin.
WebCore:
Test: platform/mac/accessibility/aria-popup.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::actionElement):
(WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
* html/HTMLAttributeNames.in:
LayoutTests:
* platform/mac/accessibility/aria-popup-expected.txt: Added.
* platform/mac/accessibility/aria-popup.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 02ca148..114906d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-20 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Beth Dakin.
+
+ WAI-ARIA popup buttons spoken as simply 'button'
+ https://bugs.webkit.org/show_bug.cgi?id=33922
+
+ * platform/mac/accessibility/aria-popup-expected.txt: Added.
+ * platform/mac/accessibility/aria-popup.html: Added.
+
2010-01-20 Csaba Osztrogonác <ossy at webkit.org>
Reviewed by Nikolas Zimmermann.
diff --git a/LayoutTests/platform/mac/accessibility/aria-popup-expected.txt b/LayoutTests/platform/mac/accessibility/aria-popup-expected.txt
new file mode 100644
index 0000000..f44ffd8
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/aria-popup-expected.txt
@@ -0,0 +1,12 @@
+Example
+This tests that when an ARIA button has aria-haspopup=true, it will be a popup button
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS button.role is 'AXRole: AXPopUpButton'
+PASS button.isActionSupported('AXPress') is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/mac/accessibility/aria-popup.html b/LayoutTests/platform/mac/accessibility/aria-popup.html
new file mode 100644
index 0000000..58dddf2
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/aria-popup.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+<script>
+var successfullyParsed = false;
+</script>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+<div id="button" role="button" aria-haspopup="true" tabindex="0" style="width:200px; border: outset 2px gray; padding:3px">Example</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that when an ARIA button has aria-haspopup=true, it will be a popup button");
+
+ if (window.accessibilityController) {
+
+ document.getElementById("button").focus();
+ var button = accessibilityController.focusedElement;
+
+ shouldBe("button.role", "'AXRole: AXPopUpButton'");
+ shouldBe("button.isActionSupported('AXPress')", "true");
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0a15bc2..2fbd51d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-20 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Beth Dakin.
+
+ WAI-ARIA popup buttons spoken as simply 'button'
+ https://bugs.webkit.org/show_bug.cgi?id=33922
+
+ Test: platform/mac/accessibility/aria-popup.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::actionElement):
+ (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
+ * html/HTMLAttributeNames.in:
+
2010-01-19 David Levin <levin at chromium.org>
Reviewed by Oliver Hunt.
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index b60fe9c..45228ec 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -617,6 +617,10 @@ Element* AccessibilityRenderObject::actionElement() const
if (m_renderer->isMenuList())
return static_cast<Element*>(m_renderer->node());
+ AccessibilityRole role = roleValue();
+ if (role == ButtonRole || role == PopUpButtonRole)
+ return static_cast<Element*>(m_renderer->node());
+
Element* elt = anchorElement();
if (!elt)
elt = mouseButtonListener();
@@ -2626,6 +2630,10 @@ AccessibilityRole AccessibilityRenderObject::determineAriaRoleAttribute() const
return UnknownRole;
AccessibilityRole role = ariaRoleToWebCoreRole(ariaRole);
+
+ if (role == ButtonRole && elementAttributeValue(aria_haspopupAttr))
+ role = PopUpButtonRole;
+
if (role)
return role;
// selects and listboxes both have options as child roles, but they map to different roles within WebCore
diff --git a/WebCore/html/HTMLAttributeNames.in b/WebCore/html/HTMLAttributeNames.in
index b2e35fc..2f2cb7e 100644
--- a/WebCore/html/HTMLAttributeNames.in
+++ b/WebCore/html/HTMLAttributeNames.in
@@ -23,6 +23,7 @@ aria-dropeffect
aria-expanded
aria-flowto
aria-grabbed
+aria-haspopup
aria-hidden
aria-label
aria-labeledby
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list