Bug 500402 - Accessible that gets it name from a label does not update its name when label text changes
Summary: Accessible that gets it name from a label does not update its name when label...
Status: NEW
Alias: None
Product: UI Automation
Classification: Mono
Component: Winforms - General (show other bugs)
Version: Release 1.0
Hardware: x86 openSUSE 11.1
: P2 - High : Normal
Target Milestone: Release 1.1
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-03 01:03 UTC by Brian Merrell
Modified: 2009-07-14 17:51 UTC (History)
1 user (show)

See Also:
Found By: Integration Test
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Merrell 2009-05-03 01:03:40 UTC
PROBLEM STATEMENT

In the StatusStrip sample application there is a ProgressBar control.  The accessible of the ProgressBar control gets its name from a label, which may have its text changed by GUI events.  The problem is that when the label (from which the progress accessible gets its name) is changed, the name of the progress bar does not update its name to match the label's new text.

REPRO

1.  Run uia2atk/test/samples/statusstrip.py
2.  Run Accerciser
3.  Browse to the progress bar accessible in Accerciser's left pane
4.  Take note of the progress bar accessible's name
5.  Using the statusstrip.py GUI, change the label from which the progress bar accessible gets its name.  (Depending on the status of Bug 500400, the label from which the progress bar accessible gets its name could be different.  The button1 button can be pressed to change the ToolStripStatusLabel on the StatusStrip and the ToolStripDropDownButton items can be pressed to change the Label just below the button1 button).
6.  Right click on the progress bar accessible in Accerciser's left pane and click "Refresh Node" 

RESULTS

Step 6 of the REPRO steps should have no affect.  That is, the progress bar accessible's name remains the same as it was in step 4, despite the label from which the progress bar accessible gets its name having changed.

EXPECTED RESULTS

An accessible that gets its name from a label should have its updated when that label changes.  I have verified this behavior in Windows (using UI Spy).
Comment 1 calen chen 2009-05-04 04:11:36 UTC
Hi Brian, I think the progress bar is got wrong name, it shouldn't get toolstriplable's text as its name but should get its own Text or AccessibleName settings.  in this sample it is been set Text="ToolStripProgressBar", so I think it's name should be "ToolStripProgressBar". 

When I update the sample to add "self.toolstripprogressbar1.AccessibleName = "ToolStripProgressBarAccessibleName" that it also get toolstriplabel's text as its name, I think the correct name should be "ToolStripProgressBarAccessibleName"

what do you think? thanks!
Comment 2 Brian Merrell 2009-05-04 04:30:22 UTC
Hi Calen.  In Windows the progress bar accessible's name is the text of the label that reads "Examples for: StatusStrip."  I believe that is the correct behavior; according to MSDN (http://msdn.microsoft.com/en-us/library/ms743681.aspx):

"The progress bar control typically gets its name from a static text label. If
there is not a static text label the application developer must expose a value
for the Name property."

However, you are correct in that setting the AccessibleName property manually should result in that value being used as the accessible's name.  This bug has already been reported as Bug 457845.
Comment 3 Ray Wang 2009-05-04 05:55:41 UTC
I think this bug is very similar to bgo 571402 (http://bugzilla.gnome.org/show_bug.cgi?id=571402), i kept track of the bug solution :)
Comment 4 calen chen 2009-05-04 06:45:05 UTC
Hi Brian, it make sense for me that progress bar gets its name from a static text label.  thanks:)

BTW, StatusStrip control and all Items on StatusStrip are not working with AccessibleName property as theirs Name  but work well in Vista. I add comment in Bug457845 to mention it. 

(In reply to comment #2)
> Hi Calen.  In Windows the progress bar accessible's name is the text of the
> label that reads "Examples for: StatusStrip."  I believe that is the correct
> behavior; according to MSDN
> (http://msdn.microsoft.com/en-us/library/ms743681.aspx):
> 
> "The progress bar control typically gets its name from a static text label. If
> there is not a static text label the application developer must expose a value
> for the Name property."
> 
> However, you are correct in that setting the AccessibleName property manually
> should result in that value being used as the accessible's name.  This bug has
> already been reported as Bug 457845.
Comment 5 Brad Taylor 2009-07-14 16:08:28 UTC
Move all P1 and P2 bugs into Release 1.1 milestone.