2009-12-16 Jon Honeycutt <jhoneycutt@apple.com>
authorjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Dec 2009 05:58:00 +0000 (05:58 +0000)
committerjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Dec 2009 05:58:00 +0000 (05:58 +0000)
commit9e70c8f31ea0f5eedbca8ff8d1fb3f3870fde8dd
tree95e27387ed4d3bc7141b7905422c867ade1d45cf
parent2371c9f98f0b6d2f3cc8eed993e8b08fd400de04
2009-12-16  Jon Honeycutt  <jhoneycutt@apple.com>

        MSAA: Accessibility role of text nodes is wrong

        https://bugs.webkit.org/show_bug.cgi?id=32631
        <rdar://problem/7369084>

        Reviewed by Alice Liu.

        Test: platform/win/accessibility/text-role.html

        WebCore/:
        * accessibility/AccessibilityObject.h:
        (WebCore::):
        Add a new role to the enum.
        (WebCore::AccessibilityObject::roleValueForMSAA):
        Declare a function to return the accessibility role for MSAA; the base
        implementation returns the old role value.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
        Initialize m_roleForMSAA.
        (WebCore::AccessibilityRenderObject::roleValueForMSAA):
        If m_roleForMSAA has been set, return it. If the renderer is a
        RenderText, set the role to EditableTextRole to match IE and Firefox.
        Otherwise, set the role for MSAA to the old role value.

        * accessibility/AccessibilityRenderObject.h:
        Add a member to hold the role for MSAA, and declare an override of
        roleValueForMSAA().

        WebKit/win/:
        * AccessibleBase.cpp:
        (MSAARole):
        If the role is WebCore::EditableTextRole, return ROLE_SYSTEM_TEXT.
        (AccessibleBase::role):
        Call roleValueForMSAA().

        LayoutTests/:
        * platform/win/accessibility/text-role-expected.txt: Added.
        * platform/win/accessibility/text-role.html: Added.
        Check that the role of the text node that is the first child of the
        <a> tag has the "editable text" role.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@52233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/win/accessibility/text-role-expected.txt [new file with mode: 0755]
LayoutTests/platform/win/accessibility/text-role.html [new file with mode: 0755]
WebCore/ChangeLog
WebCore/accessibility/AccessibilityObject.h
WebCore/accessibility/AccessibilityRenderObject.cpp
WebCore/accessibility/AccessibilityRenderObject.h
WebKit/win/AccessibleBase.cpp
WebKit/win/ChangeLog