<button> elements don't expose AXPress
Created attachment 26820 [details] Patch to make <button> show AXPress
Comment on attachment 26820 [details] Patch to make <button> show AXPress > Index: WebCore/ChangeLog > =================================================================== > --- WebCore/ChangeLog (revision 40003) > +++ WebCore/ChangeLog (working copy) > @@ -1,3 +1,15 @@ > +2009-01-16 Chris Fleizach <cfleizach@apple.com> > + > + Reviewed by NOBODY (OOPS!). > + > + AX: some buttons don't expose AXPress as an action > + https://bugs.webkit.org/show_bug.cgi?id=23399 > + > + Test: accessibility/button-press-action.html > + > + * page/AccessibilityRenderObject.cpp: > + (WebCore::AccessibilityRenderObject::actionElement): > + > 2009-01-16 Chris Fleizach <cfleizach@apple.com> > > Reviewed by Oliver Hunt. > Index: WebCore/page/AccessibilityRenderObject.cpp > =================================================================== > --- WebCore/page/AccessibilityRenderObject.cpp (revision 40003) > +++ WebCore/page/AccessibilityRenderObject.cpp (working copy) > @@ -491,10 +491,18 @@ Element* AccessibilityRenderObject::anch > > Element* AccessibilityRenderObject::actionElement() const > { > - if (m_renderer->element() && m_renderer->element()->hasTagName(inputTag)) { > - HTMLInputElement* input = static_cast<HTMLInputElement*>(m_renderer->element()); > - if (!input->disabled() && (isCheckboxOrRadio() || input->isTextButton())) > - return input; > + if (!m_renderer) > + return 0; > + > + Node* node = m_renderer->element(); > + if (node) { > + if (node->hasTagName(inputTag)) { > + HTMLInputElement* input = static_cast<HTMLInputElement*>(node); > + if (!input->disabled() && (isCheckboxOrRadio() || input->isTextButton())) > + return input; > + } > + else if (node->hasTagName(buttonTag)) > + return static_cast<Element*>(node); The else here should be on the same line as the previous } r=me
http://trac.webkit.org/changeset/40030