[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
cfleizach at apple.com
cfleizach at apple.com
Wed Dec 22 17:50:19 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 41c9dde6e9b4c6da97f86c51115ed4b85180afc0
Author: cfleizach at apple.com <cfleizach at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 1 02:51:51 2010 +0000
WebKit duplicates AXValue and AXDescription on abbr
https://bugs.webkit.org/show_bug.cgi?id=50260
Reviewed by Beth Dakin.
WebCore:
stringValue() and accessibilityDescription() were returning the same value for static text with
an aria-label. Static text elements should not have an accessibility description, they
should only have a stringValue.
Test: platform/mac/accessibility/static-text-with-aria-label.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::ariaAccessibilityDescription):
(WebCore::AccessibilityRenderObject::accessibilityDescription):
(WebCore::AccessibilityRenderObject::text):
* accessibility/AccessibilityRenderObject.h:
LayoutTests:
* platform/mac/accessibility/static-text-with-aria-label-expected.txt: Added.
* platform/mac/accessibility/static-text-with-aria-label.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index aee850b..e08a3c5 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-30 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Beth Dakin.
+
+ WebKit duplicates AXValue and AXDescription on abbr
+ https://bugs.webkit.org/show_bug.cgi?id=50260
+
+ * platform/mac/accessibility/static-text-with-aria-label-expected.txt: Added.
+ * platform/mac/accessibility/static-text-with-aria-label.html: Added.
+
2010-11-30 Gavin Barraclough <barraclough at apple.com>
Reviewed by Darin Adler.
diff --git a/LayoutTests/platform/mac/accessibility/static-text-with-aria-label-expected.txt b/LayoutTests/platform/mac/accessibility/static-text-with-aria-label-expected.txt
new file mode 100644
index 0000000..f4f84c1
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/static-text-with-aria-label-expected.txt
@@ -0,0 +1,12 @@
+"
+This tests that aria-label on a role='text' does not duplicate the AXValue in the AXDescription
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS accessibilityController.focusedElement.description is 'AXDescription: '
+PASS accessibilityController.focusedElement.stringValue is 'AXValue: inch'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/mac/accessibility/static-text-with-aria-label.html b/LayoutTests/platform/mac/accessibility/static-text-with-aria-label.html
new file mode 100644
index 0000000..04a11f5
--- /dev/null
+++ b/LayoutTests/platform/mac/accessibility/static-text-with-aria-label.html
@@ -0,0 +1,34 @@
+<!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">
+
+
+<abbr tabindex="0" id="abbrItem" role="text" aria-label="inch">"</abbr>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that aria-label on a role='text' does not duplicate the AXValue in the AXDescription");
+
+ if (window.accessibilityController) {
+
+ document.getElementById("abbrItem").focus();
+ shouldBe("accessibilityController.focusedElement.description", "'AXDescription: '");
+ shouldBe("accessibilityController.focusedElement.stringValue", "'AXValue: inch'");
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7742bf7..67e856e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-11-30 Chris Fleizach <cfleizach at apple.com>
+
+ Reviewed by Beth Dakin.
+
+ WebKit duplicates AXValue and AXDescription on abbr
+ https://bugs.webkit.org/show_bug.cgi?id=50260
+
+ stringValue() and accessibilityDescription() were returning the same value for static text with
+ an aria-label. Static text elements should not have an accessibility description, they
+ should only have a stringValue.
+
+ Test: platform/mac/accessibility/static-text-with-aria-label.html
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::ariaAccessibilityDescription):
+ (WebCore::AccessibilityRenderObject::accessibilityDescription):
+ (WebCore::AccessibilityRenderObject::text):
+ * accessibility/AccessibilityRenderObject.h:
+
2010-11-30 Ryosuke Niwa <rniwa at webkit.org>
Reviewed by Darin Adler.
diff --git a/WebCore/accessibility/AccessibilityRenderObject.cpp b/WebCore/accessibility/AccessibilityRenderObject.cpp
index 141d725..3c6079b 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -1325,17 +1325,30 @@ String AccessibilityRenderObject::ariaDescribedByAttribute() const
return accessibilityDescriptionForElements(elements);
}
+
+String AccessibilityRenderObject::ariaAccessibilityDescription() const
+{
+ const AtomicString& ariaLabel = getAttribute(aria_labelAttr);
+ if (!ariaLabel.isEmpty())
+ return ariaLabel;
+
+ String ariaDescription = ariaDescribedByAttribute();
+ if (!ariaDescription.isEmpty())
+ return ariaDescription;
+
+ return String();
+}
String AccessibilityRenderObject::accessibilityDescription() const
{
if (!m_renderer)
return String();
- const AtomicString& ariaLabel = getAttribute(aria_labelAttr);
- if (!ariaLabel.isEmpty())
- return ariaLabel;
+ // Static text should not have a description, it should only have a stringValue.
+ if (roleValue() == StaticTextRole)
+ return String();
- String ariaDescription = ariaDescribedByAttribute();
+ String ariaDescription = ariaAccessibilityDescription();
if (!ariaDescription.isEmpty())
return ariaDescription;
@@ -1895,7 +1908,7 @@ String AccessibilityRenderObject::text() const
{
// If this is a user defined static text, use the accessible name computation.
if (ariaRoleAttribute() == StaticTextRole)
- return accessibilityDescription();
+ return ariaAccessibilityDescription();
if (!isTextControl() || isPasswordField())
return String();
diff --git a/WebCore/accessibility/AccessibilityRenderObject.h b/WebCore/accessibility/AccessibilityRenderObject.h
index 970ef9f..a01008a 100644
--- a/WebCore/accessibility/AccessibilityRenderObject.h
+++ b/WebCore/accessibility/AccessibilityRenderObject.h
@@ -300,6 +300,7 @@ private:
String accessibilityDescriptionForElements(Vector<Element*> &elements) const;
void elementsFromAttribute(Vector<Element*>& elements, const QualifiedName& name) const;
+ String ariaAccessibilityDescription() const;
virtual ESpeak speakProperty() const;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list