Changeset 52351 in webkit


Ignore:
Timestamp:
Dec 18, 2009 4:05:38 PM (14 years ago)
Author:
jhoneycutt@apple.com
Message:

MSAA: Accessibility role of list items is wrong

https://bugs.webkit.org/show_bug.cgi?id=32688

Reviewed by Adam Roben.

WebCore:

Test: platform/win/accessibility/list-item-role.html

  • accessibility/AccessibilityObject.h:

(WebCore::):
Add a ListItemRole to the enum.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::msaaRoleForRenderer):
Return the role for the RenderObject, or UnknownRole if unknown.
(WebCore::AccessibilityRenderObject::roleValueForMSAA):
Call msaaRoleForRenderer() to get the role. If it is UnknownRole, fall
back to m_role.

WebKit/win:

  • AccessibleBase.cpp:

(MSAARole):
Make the WebCore list item role map to the MSAA list item role.

LayoutTests:

  • platform/win/accessibility/list-item-role-expected.txt: Added.
  • platform/win/accessibility/list-item-role.html: Added.

Verify that the list item role is "list item".

Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r52350 r52351  
     12009-12-17  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        MSAA: Accessibility role of list items is wrong
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=32688
     6
     7        Reviewed by Adam Roben.
     8
     9        * platform/win/accessibility/list-item-role-expected.txt: Added.
     10        * platform/win/accessibility/list-item-role.html: Added.
     11        Verify that the list item role is "list item".
     12
    1132009-12-17  Jon Honeycutt  <jhoneycutt@apple.com>
    214
  • trunk/WebCore/ChangeLog

    r52349 r52351  
     12009-12-17  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        MSAA: Accessibility role of list items is wrong
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=32688
     6
     7        Reviewed by Adam Roben.
     8
     9        Test: platform/win/accessibility/list-item-role.html
     10
     11        * accessibility/AccessibilityObject.h:
     12        (WebCore::):
     13        Add a ListItemRole to the enum.
     14
     15        * accessibility/AccessibilityRenderObject.cpp:
     16        (WebCore::msaaRoleForRenderer):
     17        Return the role for the RenderObject, or UnknownRole if unknown.
     18        (WebCore::AccessibilityRenderObject::roleValueForMSAA):
     19        Call msaaRoleForRenderer() to get the role. If it is UnknownRole, fall
     20        back to m_role.
     21
    1222009-12-18  Simon Fraser  <simon.fraser@apple.com>
    223
  • trunk/WebCore/accessibility/AccessibilityObject.h

    r52233 r52351  
    170170    DirectoryRole,
    171171    EditableTextRole,
    172    
     172    ListItemRole,
     173
    173174    // ARIA Grouping roles
    174175    LandmarkApplicationRole,
  • trunk/WebCore/accessibility/AccessibilityRenderObject.cpp

    r52233 r52351  
    31153115}
    31163116
     3117static AccessibilityRole msaaRoleForRenderer(const RenderObject* renderer)
     3118{
     3119    if (!renderer)
     3120        return UnknownRole;
     3121
     3122    if (renderer->isText())
     3123        return EditableTextRole;
     3124
     3125    if (renderer->isListItem())
     3126        return ListItemRole;
     3127
     3128    return UnknownRole;
     3129}
     3130
    31173131AccessibilityRole AccessibilityRenderObject::roleValueForMSAA() const
    31183132{
     
    31203134        return m_roleForMSAA;
    31213135
    3122     if (m_renderer && m_renderer->isText())
    3123         m_roleForMSAA = EditableTextRole;
    3124     else
     3136    m_roleForMSAA = msaaRoleForRenderer(m_renderer);
     3137
     3138    if (m_roleForMSAA == UnknownRole)
    31253139        m_roleForMSAA = m_role;
    31263140
  • trunk/WebKit/win/AccessibleBase.cpp

    r52350 r52351  
    566566        case WebCore::ImageRole:
    567567            return ROLE_SYSTEM_GRAPHIC;
     568        case WebCore::ListItemRole:
     569            return ROLE_SYSTEM_LISTITEM;
    568570        default:
    569571            // This is the default role for MSAA.
  • trunk/WebKit/win/ChangeLog

    r52350 r52351  
     12009-12-17  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        MSAA: Accessibility role of list items is wrong
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=32688
     6
     7        Reviewed by Adam Roben.
     8
     9        * AccessibleBase.cpp:
     10        (MSAARole):
     11        Make the WebCore list item role map to the MSAA list item role.
     12
    1132009-12-17  Jon Honeycutt  <jhoneycutt@apple.com>
    214
Note: See TracChangeset for help on using the changeset viewer.