Bug 487859 - Return HelpProvider's HelpString when querying an accessible's description
Summary: Return HelpProvider's HelpString when querying an accessible's description
Status: NEW
Alias: None
Product: UI Automation
Classification: Mono
Component: Winforms - General (show other bugs)
Version: Release 1.0
Hardware: All Linux
: P3 - Medium : Enhancement
Target Milestone: Release 1.1
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-23 17:20 UTC by Brian Merrell
Modified: 2009-05-06 20:30 UTC (History)
0 users

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


Attachments
IRC discussion referenced in COMMENTS (2.03 KB, text/plain)
2009-03-23 17:27 UTC, Brian Merrell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Merrell 2009-03-23 17:20:07 UTC
PROBLEM STATEMENT

Currently, HelpProviders really aren't that useful from an accessibility standpoint.  In Linux the F1 key is pressed when a control is focused and a ToolTip pops up with the text in the HelpProvider's HelpString property.  The problem is that the ToolTip isn't accessible like the normal ToolTips, which have their text returned when an accessible is queried for a description (see Bug 457830).  Therefore, It would be nice if we returned the HelpProvider's HelpString text, if applicable, when querying an accessible's description.

REPRO

1.  Run Accerciser, click on the "Interface Viewer" tab, and expand the "Accessible" expander.
2.  Run uia2atk/test/samples/helpprovider.py
3.  Optionally, click inside the last TextBox on the helpprovider.py application and press F1 to see that a tooltip appears with the HelpString text.
4.  In Accerciser's left pane, browse to and select the text accessible that represents the last TextBox on the helpprovider.py application.

RESULTS

In Accerciser's interface viewer, notice that there is no description for the accessible

EXPECTED RESULTS

It would be nice if we returned the HelpProvider's HelpString text, if applicable, when querying an accessible's description.

COMMENTS

Windows does not appear to do this, but it would be nice and would actually make HelpProvider useful from an accessibility perspective.  Because Window's does not appear to have this functionality, I am logging this bug as an enhancement.

I will attach an IRC discussion on the topic (between Mario and myself).
Comment 1 Brian Merrell 2009-03-23 17:27:14 UTC
Created attachment 281260 [details]
IRC discussion referenced in COMMENTS
Comment 2 Brad Taylor 2009-05-06 19:53:55 UTC
Looking into this, I'm not really sure how we could make this happen.  Controls don't have references to their HelpProvider, so when the Control's HelpText is queried, it can't know what to pull back.  Mario, do you have any bright ideas?
Comment 3 Mario Carrion 2009-05-06 20:30:25 UTC
I wrote something similar for SWF.ErrorProvider, there's a class  (ErrorProviderListener) listening 4 internal SWF.Events, 2 are used to associate control & SWF.ErrorProvider: UIAErrorProviderHookUp and UIAErrorProviderUnhookUp, in order to keep track of those new warning-icons controls added when SWF.ErrorProvider.Show is called, anyway, basically the flow is the following:
1. UIAErrorProviderHookUp is raised, ErrorProviderListener associates Control+ErrorProvider and does magic to keep track of those new controls
2. UIAErrorProviderUnhookUp is raised, ErrorProviderListener removes association.

So, writing something similar would help:

1. (new internal event) SWF.HelpProvider.UIAErrorProviderHookUp is raised when SWF.HelpProvider.SetHelpString("something") (in SWF.HelpProvider.HelperProperty.ctr), also seems that an internal event to raise changes on SWF.HelpProvider.HelperProperty.Text is going to be required, you know to actually raise an UIA NameProperty changed event when we replacing "something" with "something else", this event would be used by HelpProviderListener to keep a dictionary (control/help string).
2. (new internal event) SWF.HelpProvider.UIAErrorProviderUnhookUp is raised when SWF.HelpProvider.SetHelpString("null"), used by HelpProviderListener to remove key (control)
3. And, finally, in SimpleControlProvider we would need to call a new static method HelpProviderListener.GetErrorProvider(Control) to get the key value stored by HelpProviderListener on the dictionary.

This would work.