Commit ae6c4486 authored by cfleizach@apple.com's avatar cfleizach@apple.com

<rdar://problem/5701210> VO: If image is missing, VoiceOver does not speak the alternative text.

If an image has an alt tag, it should not be ignored



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 513e1a3f
2008-05-13 chris fleizach <cfleizach@apple.com>
Beth Dakin
<rdar://problem/5701210> VO: If image is missing, VoiceOver does not speak the alternative text.
* page/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
2008-05-13 chris fleizach <cfleizach@apple.com>
Beth Dakin
......@@ -828,12 +828,15 @@ bool AccessibilityRenderObject::accessibilityIsIgnored() const
// ignore images seemingly used as spacers
if (isImage()) {
// informal standard is to ignore images with zero-length alt strings
Node* node = m_renderer->element();
if (node && node->isElementNode()) {
Element* elt = static_cast<Element*>(node);
const AtomicString& alt = elt->getAttribute(altAttr);
if (alt.isEmpty() && !alt.isNull())
// don't ignore an image that has an alt tag
if (!alt.isEmpty())
return false;
// informal standard is to ignore images with zero-length alt strings
if (!alt.isNull())
return true;
}
......
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