Commit 95f814d7 authored by cfleizach@apple.com's avatar cfleizach@apple.com

Bug 25449: AX: Respect the alt tag of ARIA button as AXDescription

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



git-svn-id: svn://svn.chromium.org/blink/trunk@42942 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8848306e
2009-04-28 Chris Fleizach <cfleizach@apple.com>
Reviewed by Darin Adler.
Bug 25449: AX: Respect the alt tag of ARIA button as AXDescription
https://bugs.webkit.org/show_bug.cgi?id=25449
* accessibility/img-aria-button-alt-tag-expected.txt: Added.
* accessibility/img-aria-button-alt-tag.html: Added.
2009-04-28 Eric Carlson <eric.carlson@apple.com>
Reviewed by Adam Roben
<html>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
</script>
<body id="body">
<!-- This test makes sure that a img acting as an aria button still returns its alt tag as the description -->
<img id='image' src="resources/cake.png" role="button" alt="alternate" title="title">
<div id="result"></div>
<script>
if (window.accessibilityController) {
var result = document.getElementById("result");
var body = document.getElementById("body");
body.focus();
var imgUIElement = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0);
var pattern = "AXDescription: alternate";
if (imgUIElement.allAttributes().indexOf(pattern) != -1) {
result.innerText += "Test passed\n";
}
else {
result.innerText += "Test failed\n";
}
}
</script>
</body>
</html>
2009-04-28 Chris Fleizach <cfleizach@apple.com>
Reviewed by Darin Adler.
Bug 25449: AX: Respect the alt tag of ARIA button as AXDescription
https://bugs.webkit.org/show_bug.cgi?id=25449
Test: accessibility/img-aria-button-alt-tag.html
* page/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityDescription):
2009-04-28 Dan Bernstein <mitz@apple.com>
Reviewed by John Sullivan.
......@@ -941,7 +941,7 @@ String AccessibilityRenderObject::accessibilityDescription() const
if (!ariaDescription.isEmpty())
return ariaDescription;
if (isImage() || isInputImage()) {
if (isImage() || isInputImage() || isNativeImage()) {
Node* node = m_renderer->node();
if (node && node->isHTMLElement()) {
const AtomicString& alt = static_cast<HTMLElement*>(node)->getAttribute(altAttr);
......
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