Changeset 83606 in webkit


Ignore:
Timestamp:
Apr 12, 2011 10:35:36 AM (13 years ago)
Author:
mario@webkit.org
Message:

2011-04-12 Mario Sanchez Prada <msanchez@igalia.com>

Reviewed by Chris Fleizach.

[GTK] Expose menu items and menus as children of a menu bar
https://bugs.webkit.org/show_bug.cgi?id=56659

New cross-platform test. Skipped in platforms with no results yet.

  • accessibility/aria-menubar-menuitems.html: Added.
  • platform/gtk/accessibility/aria-menubar-menuitems-expected.txt: Added.
  • platform/mac/Skipped: Skipped the new test.
  • platform/win/Skipped: Ditto.

2011-04-12 Mario Sanchez Prada <msanchez@igalia.com>

Reviewed by Chris Fleizach.

[GTK] Expose menu items and menus as children of a menu bar
https://bugs.webkit.org/show_bug.cgi?id=56659

Ensure menu items get exposed when they're children of menu bars.

  • accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute): Consider menu bars as potential parent objects for menu items.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r83605 r83606  
     12011-04-12  Mario Sanchez Prada  <msanchez@igalia.com>
     2
     3        Reviewed by Chris Fleizach.
     4
     5        [GTK] Expose menu items and menus as children of a menu bar
     6        https://bugs.webkit.org/show_bug.cgi?id=56659
     7
     8        New cross-platform test. Skipped in platforms with no results yet.
     9
     10        * accessibility/aria-menubar-menuitems.html: Added.
     11        * platform/gtk/accessibility/aria-menubar-menuitems-expected.txt: Added.
     12        * platform/mac/Skipped: Skipped the new test.
     13        * platform/win/Skipped: Ditto.
     14
    1152011-04-12  Jessie Berlin  <jberlin@apple.com>
    216
  • trunk/LayoutTests/platform/mac/Skipped

    r83292 r83606  
    6969# Accessibility tests without results
    7070accessibility/document-attributes.html
     71accessibility/aria-menubar-menuitems.html
    7172
    7273# Accessibility tests with missing AccessibilityController functionality.
  • trunk/LayoutTests/platform/win/Skipped

    r83532 r83606  
    509509accessibility/aria-link-supports-press.html
    510510accessibility/aria-list-and-listitem.html
     511accessibility/aria-menubar-menuitems.html
    511512accessibility/aria-presentational-role.html
    512513accessibility/aria-readonly.html
  • trunk/Source/WebCore/ChangeLog

    r83601 r83606  
     12011-04-12  Mario Sanchez Prada  <msanchez@igalia.com>
     2
     3        Reviewed by Chris Fleizach.
     4
     5        [GTK] Expose menu items and menus as children of a menu bar
     6        https://bugs.webkit.org/show_bug.cgi?id=56659
     7
     8        Ensure menu items get exposed when they're children of menu bars.
     9
     10        * accessibility/AccessibilityRenderObject.cpp:
     11        (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
     12        Consider menu bars as potential parent objects for menu items.
     13
    1142011-04-12  Pavel Feldman  <pfeldman@google.com>
    215
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r83493 r83606  
    29752975    if (role)
    29762976        return role;
     2977
     2978    AccessibilityObject* parentObject = parentObjectUnignored();
     2979    if (!parentObject)
     2980        return UnknownRole;
     2981
     2982    AccessibilityRole parentAriaRole = parentObject->ariaRoleAttribute();
     2983
    29772984    // selects and listboxes both have options as child roles, but they map to different roles within WebCore
    29782985    if (equalIgnoringCase(ariaRole, "option")) {
    2979         if (parentObjectUnignored()->ariaRoleAttribute() == MenuRole)
     2986        if (parentAriaRole == MenuRole)
    29802987            return MenuItemRole;
    2981         if (parentObjectUnignored()->ariaRoleAttribute() == ListBoxRole)
     2988        if (parentAriaRole == ListBoxRole)
    29822989            return ListBoxOptionRole;
    29832990    }
    29842991    // an aria "menuitem" may map to MenuButton or MenuItem depending on its parent
    29852992    if (equalIgnoringCase(ariaRole, "menuitem")) {
    2986         if (parentObjectUnignored()->ariaRoleAttribute() == GroupRole)
     2993        if (parentAriaRole == GroupRole)
    29872994            return MenuButtonRole;
    2988         if (parentObjectUnignored()->ariaRoleAttribute() == MenuRole)
     2995        if (parentAriaRole == MenuRole || parentAriaRole == MenuBarRole)
    29892996            return MenuItemRole;
    29902997    }
Note: See TracChangeset for help on using the changeset viewer.