Bug 508079

Summary: ToolStripMenuItem: menu loses "focused" after mouse clicks and moves away
Product: [Mono] UI Automation Reporter: Brian Merrell <bgmerrell>
Component: Winforms - GeneralAssignee: E-mail List <mono-a11y-bugs>
Status: VERIFIED INVALID 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: ---

Description Brian Merrell 2009-05-29 07:48:52 UTC
PROBLEM STATEMENT

A ToolStripMenuItem can be represented as a "menu" or a "menu item" accessible
(depending on whether it has children or not).  A ToolStripMenuItem root menu has the "focused" state after being clicked on (and should have the "selected" according to Bug 508077).  This is expected (well, sort of, see EXPECTED RESULTS), but the problem is that when the mouse leaves the component boundaries of the accessible, the accessible loses the "focused".  This does not occur in Gtk.

REPRO

1.  Run Accerciser, open the "Interface Viewer" tab, and expand the "Accessible" expander
2.  Run uia2atk/test/samples/toolstripmenuitem.py
3.  In Accerciser's left pane, browse to and select the "View" menu accessible
4.  In the menustrip.py application, left-click on the "View" menu.  Notice in the interface viewer that the accessible gains the "focused" states (and perhaps the "selected" state depending on the resolution of Bug 508077).
5.  Move the mouse down to the "Create" menu item (but do not click)

RESULTS

The "File" menu accessible loses the "focused" states (and possibly the the "selected" state depending on the resolution of Bug 508077)

EXPECTED RESULTS

In Gtk, both the "selected" and "focused" states remain on the root menu accessible for a MenuBar.  When using the keyboard to navigate the menustrip.py sample (i.e., pressing Alt+F to open the "File" menu and pressing the down arrow to move to the "New" menu item) the "selected" and "focused" states also remain on the menu.  When using the keyboard to navigate a Gtk example, the "focused" state is added to the menu accessible, only the "selected" state is added.  Basically, nothing is very consistent, but I would expect at least the "selected" state to stay on the "View" menu accessible in this case.  

I definitely think our behavior should be the same regardless if the mouse of keyboard are used to navigate.  Gtk+ is inconsistent in this regard, but I believe that it is probably a bug on their part.

COMMENTS

Bug 508073 is very similar to this one, but for the MenuStrip.
Comment 1 Brian Merrell 2009-07-02 16:25:44 UTC
This is desired behavior.  If Bug 508077 is resolved and then the menu loses the "selected" state, then we should log a bug for that.