Bug 554017

Summary: Do click action doesn't move focus to the clicked element
Product: [Mono] UI Automation Reporter: calen chen <cachen>
Component: Moonlight - GeneralAssignee: Mario Carrion <mcarrion>
Status: RESOLVED FIXED QA Contact: E-mail List <mono-a11y-qa>
Severity: Major    
Priority: P2 - High    
Version: Unspecified   
Target Milestone: Release 2.1   
Hardware: x86   
OS: openSUSE 11.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: script for gtkcheckbox.py
Potential fix

Description calen chen 2009-11-10 07:36:08 UTC
REPRO:

1. Make /uia2atk/test/samples/moonlight/CheckBox
3. Run CheckBoxSample.html
4. Run accerciser
5. On accerciser, expend CheckBoxSample document frame and Silverlight Control fille, select one checkbox
6. Under interface viewer, expand Action, select 'click', click 'Perform action'

RESULTS:

the checkbox is checked, but is not focused

EXPECTED RESULTS:

I think if the action is imitate mouse click, the action should move focus to the clicked checkbox(Button and other focusable element is in the same situation). 

COMMENTS:

I have tried other none-moonlight web page that can work like what the expected.
Comment 1 Brad Taylor 2009-12-02 19:33:49 UTC
Calen, if you try this using Gtk+, for instance in the example below, the control does not receive focus when clicked.

1. Open up gedit.
2. Click on the Tools menu, and find the Preferences item.
3. Click on the Preferences item.
4. On the Fonts and Colors tab, find the "Use the system fixed width font" checkbox.
5. Open Accerciser, and find the checkbox in step 4 in the tree.
6. Expand Accessible and Action sections on the Interface Viewer tab.
7. Click on the "click" action and press "Perform action".
8. Notice that "focused" is not a state that has been added to the States list under the Accessible section.

The "click" action is poorly named as it doesn't necessarily perform exactly what a mouse click would do, but this is a GAIL/ATK problem, and not really our problem to fix.
Comment 2 calen chen 2009-12-03 07:12:46 UTC
(In reply to comment #1)
> Calen, if you try this using Gtk+, for instance in the example below, the
> control does not receive focus when clicked.
> 
> 1. Open up gedit.
> 2. Click on the Tools menu, and find the Preferences item.
> 3. Click on the Preferences item.
> 4. On the Fonts and Colors tab, find the "Use the system fixed width font"
> checkbox.
> 5. Open Accerciser, and find the checkbox in step 4 in the tree.
> 6. Expand Accessible and Action sections on the Interface Viewer tab.
> 7. Click on the "click" action and press "Perform action".
> 8. Notice that "focused" is not a state that has been added to the States list
> under the Accessible section.
> 
> The "click" action is poorly named as it doesn't necessarily perform exactly
> what a mouse click would do, but this is a GAIL/ATK problem, and not really our
> problem to fix.

Hey Brad, in fact the control receive focus when clicked if you add a step between 7 and 8 to click dialog's *title bar*, you didn't see the focused state just because the dialog of gedit is not in active, but focus on accerciser. 

please try the attachment script, after run #states.py /A11y/uia2atk/test/samples/gtk/gtkcheckbutton.py, you can see check button2 is focused.

I think it's similar to bug504593 of winforms, please take a look, thanks:)
Comment 3 calen chen 2009-12-03 07:22:13 UTC
Created attachment 330680 [details]
script for gtkcheckbox.py
Comment 4 Brad Taylor 2010-02-11 21:58:28 UTC
Created attachment 342116 [details]
Potential fix

Here's a potential fix for the problem in Moonlight.  I need to get sign-off from the Moonlight team, and because they're in their crunch for the Olympics, it might take some time to get this committed.
Comment 5 Brad Taylor 2010-02-11 21:59:03 UTC
Hours today.
Comment 6 Rui Guo 2010-02-24 12:30:06 UTC
I happened to find that #525428 mentioned the same bug.
Comment 7 Brad Taylor 2010-03-31 13:40:52 UTC
Unassigning to focus on Firefox and SLED bugs.
Comment 8 calen chen 2010-05-05 08:42:11 UTC
*** Bug 559133 has been marked as a duplicate of this bug. ***
Comment 9 Mario Carrion 2010-09-01 15:47:54 UTC
Fixed. moon-2-0: de53e311d30b3480ff58