WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-61995-20110603175125.patch (text/plain), 5.83 KB, created by
Alice Boxhall
on 2011-06-03 00:51:27 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alice Boxhall
Created:
2011-06-03 00:51:27 PDT
Size:
5.83 KB
patch
obsolete
>Subversion Revision: 87453 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index e16cac57beb5289fd49a2c85711a39aa2f67e3fd..47136ec51bde1ebdac3f0ebe4ecde387aa024162 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2011-06-03 Alice Boxhall <aboxhall@chromium.org> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Accessibility description for an element should make use of aria-labelledby. >+ https://bugs.webkit.org/show_bug.cgi?id=61995 >+ >+ * accessibility/aria-description-prefers-aria-labelledby-expected.txt: Added. >+ * accessibility/aria-description-prefers-aria-labelledby.html: Added. >+ > 2011-05-26 Qi Zhang <qi.2.zhang@nokia.com> > > Reviewed by Andreas Kling. >diff --git a/LayoutTests/accessibility/aria-description-prefers-aria-labelledby-expected.txt b/LayoutTests/accessibility/aria-description-prefers-aria-labelledby-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..5b22eff2b11df215ff051d7b709ba45651973a87 >--- /dev/null >+++ b/LayoutTests/accessibility/aria-description-prefers-aria-labelledby-expected.txt >@@ -0,0 +1,32 @@ >+Banana: >+An article about bananas. >+ >+This article has two lines. >+ >+Another article about bananas. >+ >+This article also has two lines. >+ >+An article about peaches. >+ >+This article also has two lines. >+ >+This tests that aria-labelledby is used in preference to aria-label in creating an accessibility description for an element. The description for the element should be the value from the element referred to by aria-labelledby, even if an aria-label is present. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+ >+ >+PASS obj.description is "AXDescription: Banana" >+PASS obj.description is "AXDescription: Banana" >+PASS obj.description is "AXDescription: Peaches" >+ >+ >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >+ >+ >+ >diff --git a/LayoutTests/accessibility/aria-description-prefers-aria-labelledby.html b/LayoutTests/accessibility/aria-description-prefers-aria-labelledby.html >new file mode 100644 >index 0000000000000000000000000000000000000000..75768dd5001e188d43fec0a9c7bff95d5b8c6b61 >--- /dev/null >+++ b/LayoutTests/accessibility/aria-description-prefers-aria-labelledby.html >@@ -0,0 +1,55 @@ >+<!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"> >+<span id="banana-label">Banana</span>: >+<div role="article" aria-labelledby="banana-label"> >+ <p>An article about bananas.</p> >+ <p>This article has two lines.</p> >+</div> >+<div role="article" aria-labelledby="banana-label" aria-label="Peaches"> >+ <p>Another article about bananas.</p> >+ <p>This article also has two lines.</p> >+</div> >+<div role="article" aria-label="Peaches"> >+ <p>An article about peaches.</p> >+ <p>This article also has two lines.</p> >+</div> >+<p id="description"></p> >+<ul id="console"></div> >+ >+<script> >+ >+ description("This tests that aria-labelledby is used in preference to aria-label in creating an accessibility description for an element. " + >+ "The description for the element should be the value from the element referred to by aria-labelledby, even if an aria-label is present."); >+ >+ function log(str) { >+ var console = document.getElementById("console"); >+ var li = document.createElement("li"); >+ li.appendChild(document.createTextNode(str)); >+ console.appendChild(li); >+ } >+ >+ if (window.accessibilityController) { >+ var body = document.getElementById("body"); >+ body.focus(); >+ var obj = accessibilityController.focusedElement.childAtIndex(1); >+ shouldBe("obj.description", '"AXDescription: Banana"'); >+ obj = accessibilityController.focusedElement.childAtIndex(2); >+ shouldBe("obj.description", '"AXDescription: Banana"'); >+ obj = accessibilityController.focusedElement.childAtIndex(3); >+ shouldBe("obj.description", '"AXDescription: Peaches"'); >+ } >+ >+ successfullyParsed = true; >+</script> >+ >+<script src="../fast/js/resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 6636439e397451279f1bc6293dcff8301e583cc3..8355923f2336dc8f7678fb48749efdf2acf51ae8 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2011-06-03 Alice Boxhall <aboxhall@chromium.org> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Accessibility description for an element should make use of aria-labelledby. >+ https://bugs.webkit.org/show_bug.cgi?id=61995 >+ >+ Test: accessibility/aria-description-prefers-aria-labelledby.html >+ >+ * accessibility/AccessibilityRenderObject.cpp: >+ (WebCore::AccessibilityRenderObject::ariaAccessibilityDescription): Return value from aria-labelledby in preference to value from aria-label. >+ > 2011-05-26 Annie Sullivan <sullivan@chromium.org> > > Reviewed by Ryosuke Niwa. >diff --git a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >index c12a3ea62f928dee2dc5d86d62f60511b799244e..b2d3dd2717016a6d8c6c8e22bb626dd099a83244 100644 >--- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >+++ b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >@@ -1351,6 +1351,10 @@ String AccessibilityRenderObject::ariaDescribedByAttribute() const > > String AccessibilityRenderObject::ariaAccessibilityDescription() const > { >+ const AtomicString& ariaLabelledBy = ariaLabeledByAttribute(); >+ if (!ariaLabelledBy.isEmpty()) >+ return ariaLabelledBy; >+ > const AtomicString& ariaLabel = getAttribute(aria_labelAttr); > if (!ariaLabel.isEmpty()) > return ariaLabel;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 61995
:
95866
|
96391
|
97234
|
97376