Bug 56659 - [GTK] Expose menu items and menus as children of a menu bar
Summary: [GTK] Expose menu items and menus as children of a menu bar
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks: 30796
  Show dependency treegraph
 
Reported: 2011-03-18 10:43 PDT by Mario Sanchez Prada
Modified: 2011-04-12 10:35 PDT (History)
2 users (show)

See Also:


Attachments
Patch proposal + Layout test (8.34 KB, patch)
2011-04-11 09:32 PDT, Mario Sanchez Prada
cfleizach: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Sanchez Prada 2011-03-18 10:43:01 PDT
In the following example:
http://test.cita.illinois.edu/aria/menubar/menubar1.php

Theres some WAI-ARIA compliant HTML exposing a menu bar with 4 menu items, where each of them pop out a menu when activated, showing some more menu items in those menus. That is, the typical menubar -> menuitems -> menu (for each menu item) -> menu item (for each menu) layout :-)

Problem is that WebKitGTK should be exposing something like this (as for roles):

  Menubar
   |---> menu item
   |      `---> menu
   |             |---> menu item
   |             |---> menu item
   |             `---> menu item
   |---> menu item
   |      `---> menu
   |             |---> menu item
   |             |---> menu item
   |             `---> menu item
   |---> menu item
   |      `---> menu
   |             |---> menu item
   |             |---> menu item
   |             `---> menu item
   `---> menu item
          `---> menu
                 |---> menu item
                 |---> menu item
                 `---> menu item

However, what is currently exposing is the following:
  Menubar
   |---> panel
   |---> panel
   |---> panel
   `---> panel

...which is obviously wrong, preventing ATs from checking the contents of those menus
Comment 1 Mario Sanchez Prada 2011-04-11 09:32:16 PDT
Created attachment 89015 [details]
Patch proposal + Layout test

Attaching simple patch to fix this along with a cross platform test (needs adding new results for other platforms, say, Mac and Win)
Comment 2 chris fleizach 2011-04-12 08:50:44 PDT
Comment on attachment 89015 [details]
Patch proposal + Layout test

View in context: https://bugs.webkit.org/attachment.cgi?id=89015&action=review

otherwise looks good. r=me

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2968
>              return MenuItemRole;

It looks like we're calling parentObjectUnignored()->ariaRoleAttribute() potentially three times. I think that value should be stored local. parentObjectUnignored() can be little expensive.
Comment 3 Mario Sanchez Prada 2011-04-12 09:51:01 PDT
(In reply to comment #2)
> (From update of attachment 89015 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=89015&action=review
> 
> otherwise looks good. r=me
> 
> > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2968
> >              return MenuItemRole;
> 
> It looks like we're calling parentObjectUnignored()->ariaRoleAttribute() potentially three times. I think that value should be stored local. parentObjectUnignored() can be little expensive.

I'll fix that right before committing.

Thanks!
Comment 4 Mario Sanchez Prada 2011-04-12 10:35:53 PDT
Committed r83606: <http://trac.webkit.org/changeset/83606>