Bug 23399 - AX: some buttons don't expose AXPress as an action
Summary: AX: some buttons don't expose AXPress as an action
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-16 18:33 PST by chris fleizach
Modified: 2009-01-19 10:19 PST (History)
0 users

See Also:


Attachments
Patch to make <button> show AXPress (3.79 KB, patch)
2009-01-16 18:35 PST, chris fleizach
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description chris fleizach 2009-01-16 18:33:31 PST
<button> elements don't expose AXPress
Comment 1 chris fleizach 2009-01-16 18:35:22 PST
Created attachment 26820 [details]
Patch to make <button> show AXPress
Comment 2 Dave Hyatt 2009-01-16 20:57:59 PST
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
Comment 3 chris fleizach 2009-01-19 10:19:00 PST
http://trac.webkit.org/changeset/40030