Commit 2adb5a15 authored by cfleizach@apple.com's avatar cfleizach@apple.com
Browse files

AX: need an aria-help

https://bugs.webkit.org/show_bug.cgi?id=40010

Reviewed by David Kilzer.

WebCore: 

Test: accessibility/aria-help.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::helpText):
* html/HTMLAttributeNames.in:

LayoutTests: 

* accessibility/aria-help-expected.txt: Added.
* accessibility/aria-help.html: Added.
* platform/gtk/Skipped:
* platform/win/Skipped:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 32d242c0
2010-06-04 Chris Fleizach <cfleizach@apple.com>
Reviewed by David Kilzer.
AX: need an aria-help
https://bugs.webkit.org/show_bug.cgi?id=40010
* accessibility/aria-help-expected.txt: Added.
* accessibility/aria-help.html: Added.
* platform/gtk/Skipped:
* platform/win/Skipped:
2010-06-04 Andreas Kling <andreas.kling@nokia.com>
 
Reviewed by Tor Arne Vestbø.
......
button
This tests that aria-help attribute works as expected.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS button.helpText is 'AXHelp: click here'
PASS successfullyParsed is true
TEST COMPLETE
<!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" tabindex=0 role="button" aria-label="title" aria-help="click here">
button
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that aria-help attribute works as expected.");
if (window.accessibilityController) {
document.getElementById("button").focus();
var button = accessibilityController.focusedElement;
shouldBe("button.helpText", "'AXHelp: click here'");
}
successfullyParsed = true;
</script>
<script src="../fast/js/resources/js-test-post.js"></script>
</body>
</html>
......@@ -47,6 +47,7 @@
accessibility/aria-checkbox-text.html
accessibility/aria-combobox.html
accessibility/aria-disabled.html
accessibility/aria-help.html
accessibility/aria-hidden.html
accessibility/aria-hidden-with-elements.html
accessibility/aria-label.html
......
......@@ -374,6 +374,7 @@ accessibility/aria-combobox.html
accessibility/aria-controls-with-tabs.html
accessibility/aria-describedby-on-input.html
accessibility/aria-disabled.html
accessibility/aria-help.html
accessibility/aria-hidden.html
accessibility/aria-hidden-with-elements.html
accessibility/aria-label.html
......
2010-06-04 Chris Fleizach <cfleizach@apple.com>
Reviewed by David Kilzer.
AX: need an aria-help
https://bugs.webkit.org/show_bug.cgi?id=40010
Test: accessibility/aria-help.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::helpText):
* html/HTMLAttributeNames.in:
2010-06-04 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Tor Arne Vestbø.
......
......@@ -928,6 +928,10 @@ String AccessibilityRenderObject::helpText() const
if (!m_renderer)
return String();
const AtomicString& ariaHelp = getAttribute(aria_helpAttr);
if (!ariaHelp.isEmpty())
return ariaHelp;
for (RenderObject* curr = m_renderer; curr; curr = curr->parent()) {
if (curr->node() && curr->node()->isHTMLElement()) {
const AtomicString& summary = static_cast<Element*>(curr->node())->getAttribute(summaryAttr);
......
......@@ -24,6 +24,7 @@ aria-expanded
aria-flowto
aria-grabbed
aria-haspopup
aria-help
aria-hidden
aria-label
aria-labeledby
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment