<rdar://problem/5932677> AX: Submit buttons aren't returning AXTitle
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 23:55:41 +0000 (23:55 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 23:55:41 +0000 (23:55 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33420 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/page/AccessibilityRenderObject.cpp

index b4b8d4f..8ab405e 100644 (file)
@@ -1,3 +1,12 @@
+2008-05-13  chris fleizach  <cfleizach@apple.com>
+
+        Reviewed by Beth Dakin
+
+        <rdar://problem/5932677> AX: Submit buttons aren't returning AXTitle
+
+        * page/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::title):
+
 2008-05-13  Timothy Hatcher  <timothy@apple.com>
 
         Adds an overlay window that covers the scripts panel and
index d857cba..1071c06 100644 (file)
@@ -622,9 +622,6 @@ String AccessibilityRenderObject::title() const
     if (!ariaLabel.isEmpty())
         return ariaLabel;
     
-    if (roleValue() == ButtonRole)
-        return textUnderElement();
-    
     bool isInputTag = node->hasTagName(inputTag);
     if (isInputTag) {
         HTMLInputElement* input = static_cast<HTMLInputElement*>(node);
@@ -638,6 +635,9 @@ String AccessibilityRenderObject::title() const
             return label->innerText();
     }
     
+    if (roleValue() == ButtonRole)
+        return textUnderElement();
+    
     if (isLink()) {
         Element* element = static_cast<Element*>(node);    
         const AtomicString& title = element->getAttribute(titleAttr);