Bug 516151

Summary: MainMenu: top-level menu accessibles should not have "focusable" state
Product: [Mono] UI Automation Reporter: Brian Merrell <bgmerrell>
Component: Winforms - GeneralAssignee: E-mail List <mono-a11y-bugs>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <mono-a11y-qa>
Severity: Normal    
Priority: P4 - Low CC: cachen
Version: Release 1.0   
Target Milestone: ---   
Hardware: x86   
OS: openSUSE 11.1   
Whiteboard:
Found By: Integration Test Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: for mainmenu sample
for toolstripmenuitem sample

Description Brian Merrell 2009-06-24 17:40:04 UTC
PROBLEM STATEMENT

The top-level menu accessibles of the MainMenu currently have the "focusable" state, but they should not; they can never have keyboard focus as far as I can tell.

REPRO

1.  Run uia2atk/test/samples/mainmenu.py
2.  Run Accerciser, click on the "Interface Viewer" tab, and expand the "Accessible" expander.
3.  In Accerciser's left pane, browse to and select the "File" menu accessible of the mainmenu.py ipy appliation.

RESULTS

Notice that the selected accessible has the "focusable" state showing in the interface viewer.

EXPECTED RESULTS

None of the top-level drop-down menus of the MainMenu control should have the "focusable" state.

COMMENTS

There is some discussion concerning whether top-level drop-down menus of the MenuStrip and ToolStrip controls should have the "focusable" state.  However, those cases are a bit different because the keyboard can be used to navigate between the menus without dropping them down.  That does not seem to be possible for the MainMenu control, so I don't think there is any question that the top-level drop-down menus of the MainMenu control should not have the "focusable" state (unless I'm missing something).
Comment 1 Brian Merrell 2009-06-24 17:50:14 UTC
For top-level MainMenu menus with one child, like the "Help" menu in the mainmenu.py sample, it would appear that they can receive keyboard focus.  For example, open mainmenu.py and press Alt+H to open the "Help" menu, and then press the "up" key.  Notice that the keyboard focus leaves the drop-down menu and would appear to now be with the "Help" menu.  This is the only case where this happens; if the menu has more than one child, the focus just cycles between the menu items when the up/down keys are pressed. Since this appears to be a special case, I don't think it would be necessary to consider it when addressing this bug.
Comment 2 Feng Xia Mu 2009-07-03 07:17:53 UTC
Created attachment 302665 [details]
for mainmenu sample
Comment 3 Feng Xia Mu 2009-07-03 07:18:46 UTC
Created attachment 302668 [details]
for toolstripmenuitem sample
Comment 4 Feng Xia Mu 2009-07-03 07:33:17 UTC
hi, Brian, I think the bug about MainMenu should be described like this:
MainMenu: top-level menu accessibles should have the "focused" and "selected" state

see the attachment for toolstrimenuitem, we can see that the "File" menu is a menu of menu bar, and it can be focused.

see the attachment for mainmenu, the "File" menu is focused, and it is also a menu of menu bar, so it should perform as same as the "File" menu in toolstrimenuitem to have a "focused" state . 

for "selected" state: since it can be selectable, and actually can be selected(press alt + F), it should have "selected" state.
Comment 5 Feng Xia Mu 2009-07-03 08:09:15 UTC
Sorry, the summary should be more fit-able as "the submenu and menu item accessibles should receive the "focused" and"selected" states when they are navigated to."

please see :
bug 503278 - MainMenu: menu missing "selected" and "focused" states (close)
bug 516129 - MainMenu: Menu items and submenus never receive "focused" and "selected" states
bug 516132 - MainMenu: top-level menu accessibles do not receive "selected" state when dropped down

I think bug 516129 and bug 516132 can be merged to one bug: MainMenu: menu , submenus, menu items never receive "focused" and "selected" states when they are navigated to.

if above "I think" is correct, I propose to close following bugs:
bug 516151 - MainMenu: top-level menu accessibles should not have "focusable" state.
bug 476362 - MainMenu, MenuStrip: menu item's "selected" state is missing when you select a menu item
bug 485515 - MainMenu: extraneous "focusable" state on Menu and MenuItem

duplicate following bugs:
bug 516129 - MainMenu: Menu items and submenus never receive "focused" and "selected" states
bug 516132 - MainMenu: top-level menu accessibles do not receive "selected" state when dropped down
Comment 6 Feng Xia Mu 2009-07-03 09:55:00 UTC
all I want to say is:
I think the " menu, submenu, menu items" should have "focusable" and "selectable" state at the beginning , and  can be "selected" at the same time, but the "focused" state only cycles between them.

take the following for example: 
menu("File")--> submenu ("New")--> menu items("Document")
<----------------------------------------------------------------------->
1. press "alt + F"               "File" + selected
                                 "New"  + selected + focused

2. press "right"                 "File" + selected
                                 "New"  + selected 
                                 "Document" + selected + focused
<----------------------------------------------------------------------->

1. mouse click "File"            "File" + selected + focused 

2. press "down"                  "File" + selected 
                                 "New"  + selected + focused

3. press "right"                 "File" + selected
                                 "New"  + selected 
                                 "Document" + selected + focused
<----------------------------------------------------------------------->
1. mouse click "File"            "File" + selected + focused 

2. move mouse to "New"           "File" + selected 
                                 "New"  + selected + focused

3. move mouse to "Document"      "File" + selected
                                 "New"  + selected 
                                 "Document" + selected + focused

<----------------------------------------------------------------------->
the end.
Comment 7 Brian Merrell 2009-07-06 16:12:51 UTC
Felicia, this bug was meant to be specifically for keyboard navigation.  However, I did not make that clear (but it is mentioned in the PROBLEM STATEMENT).  Would you agree that we could simply change the summary to indicate that this bug refers to keyboard navigation only?
Comment 8 Brian Merrell 2009-07-06 16:47:56 UTC
Sorry, Comment #7 was not very clear.  Regardless, let's just close this bug and focus on bug 485515 so we are not discussing the same issue in two different places.

*** This bug has been marked as a duplicate of bug 485515 ***
Comment 9 Feng Xia Mu 2009-07-07 02:17:05 UTC
(In reply to comment #7)
> Felicia, this bug was meant to be specifically for keyboard navigation. 
> However, I did not make that clear (but it is mentioned in the PROBLEM
> STATEMENT).  Would you agree that we could simply change the summary to
> indicate that this bug refers to keyboard navigation only?

I agree, Brian.