<rdar://problem/5701210> VO: If image is missing, VoiceOver does not speak the altern...
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 20:58:30 +0000 (20:58 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 20:58:30 +0000 (20:58 +0000)
If an image has an alt tag, it should not be ignored

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33387 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/page/AccessibilityRenderObject.cpp

index a9e8934..44c489b 100644 (file)
@@ -2,6 +2,15 @@
 
         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
+
         <rdar://problem/5908446> AX: webkit needs to return blockquote information for all AX objects, not just in AXTextMarker info
 
         * page/mac/AccessibilityObjectWrapper.mm:
index c78d77f..d857cba 100644 (file)
@@ -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;
         }