Bug 476362

Summary: MainMenu, MenuStrip: menu item's "selected" state is missing when you select a menu item
Product: [Mono] UI Automation Reporter: Ray Wang <rawang>
Component: Winforms - ATKAssignee: E-mail List <mono-a11y-bugs>
Status: NEW --- QA Contact: E-mail List <mono-a11y-qa>
Severity: Normal    
Priority: P3 - Medium CC: cachen
Version: Release 0.9.1   
Target Milestone: Release 1.1   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ray Wang 2009-02-17 08:19:02 UTC
PROBLEM STATEMENT:
when you select menustrip's child, menuitem, from accerciser, there should be a "selected" state appeared in its states stack. but it's not.

REPRODUCE:
1. start uia2atk/test/samples/menustrip.py and accerciser
2. locate to "ipy" -> "MenuStrip Control" -> menu bar
3. open tab "Interface viewer", then expand "Selection" and "Accessible"
4. click a item from the "Selection"
5. navigate to "File" which is the child of menu bar
6. watch its states in "Accessible" on the right side.

RESULTS:
there are "enabled", "selectable", "sensitive", "showing", "visible" states there. 

EXPECTED RESULTS:
there should be an additional state, "selected" there, since we have already selected the menuitem from above steps
Comment 1 Brad Taylor 2009-03-04 16:29:53 UTC
Hmm, I was discussing this with Calen, and I think I have to disagree with this.  If the menu is not visible, it shouldn't have either Selected or Focused because it is not being interacted with visually.
Comment 2 Ray Wang 2009-03-05 08:36:46 UTC
Yes, but I think we are not saying the same thing.

if you look at menustrip.py sample, you will see there are only 1 depth menu items on the menustrip. those menu items have "showing" and "visible" states, and of course there are showed and visible. when you click or use shortcut to access the menu item, it is "selected", but it doesn't gain "focused" state, do you think it's correct? 

thanks :)
Comment 3 Brad Taylor 2009-03-05 14:42:16 UTC
Are the menu items keyboard focusable?  I can't move my focus with tab or arrow keys, and I see no focus rectangle drawn around the menu, so that's why I'm coming to the conclusion that it shouldn't have Focused.
Comment 4 Ray Wang 2009-03-06 03:13:58 UTC
Hey, brad, I accidentally found, if you start the sample and press "Alt+L", then you will see the focus, and you could press "tab" and "left/right" to transfer focus. that's weird :)
Comment 5 Ray Wang 2009-03-06 03:14:31 UTC
remove NEEDINFO tag
Comment 6 Brian Merrell 2009-05-29 15:25:36 UTC
Ray, is this still an issue?  When I select the "menu bar" accessible in Accerciser and type "acc.querySelection().selectChild(0)" in the IPython console, the "File" menu accessible receives the "selected" state.
Comment 7 Ray Wang 2009-05-31 02:55:27 UTC
Hey Brian, seems like this is not a issue any more, please remove NEEDINFO and leave it as RESOLVED. 
thanks a lot! :)
Comment 8 Brian Merrell 2009-05-31 05:27:07 UTC
We should let Sandy (the assignee) mark it as resolved/fixed).
Comment 9 Ray Wang 2009-06-24 09:02:34 UTC
I change the summary, since the bug is also happened on MainMenu.
Comment 10 Ray Wang 2009-06-24 09:38:01 UTC
This bug for MenuStrip won't happen when you select a menu in "Selection" at menu bar level, but it is happened when you select a menu( item) in "Selection" at "File", "Edit" menu level.