Bug 459223 - Accessible properties are not set but after calling AccessibilityObject
Summary: Accessible properties are not set but after calling AccessibilityObject
Status: RESOLVED FIXED
Alias: None
Product: Mono: Class Libraries
Classification: Mono
Component: Windows.Forms (show other bugs)
Version: SVN
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Mario Carrion
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 457845
  Show dependency treegraph
 
Reported: 2008-12-15 20:46 UTC by Mario Carrion
Modified: 2008-12-29 18:17 UTC (History)
0 users

See Also:
Found By: Beta-Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Example. (1.63 KB, text/plain)
2008-12-15 20:46 UTC, Mario Carrion
Details
Proposed patch. (934 bytes, patch)
2008-12-15 20:47 UTC, Mario Carrion
Details | Diff
Proposed patch. (5.97 KB, patch)
2008-12-22 02:52 UTC, Mario Carrion
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Carrion 2008-12-15 20:46:01 UTC
Created attachment 260176 [details]
Example.

In order to set: 

- Control.AccessibleDefaultActionDescription,
- Control.AccessibleDescription,
- Control.AccessibleName, or
- Control.AccessibleRole

you need to call Control.AccessibilityObject.

Run the attached example: 

gmcs -r:System.Windows.Forms,System,System.Drawing Program.cs -t:exe && mono Program.exe

1. Click: "Print accessible" button, you get the following output:

Button1.AccessibleName: 
Button1.AccessibleDescription : 
Button1.AccessibleDefaultActionDescription: 

2. Click: "AccessibleName is" button, you don't get any output, AccessibleXXX properties are set.
3. Click: "Print accessible" button, you should get the following output:

Button1.AccessibleName: AccessibleName is not empty
Button1.AccessibleDescription : AccessibleDescription is not empty
Button1.AccessibleDefaultActionDescription: AccessibleDefaultActionDescription is not empty

however you are getting the same output as in step 1.
Comment 1 Mario Carrion 2008-12-15 20:47:11 UTC
Created attachment 260177 [details]
Proposed patch.
Comment 2 Mario Carrion 2008-12-15 22:50:20 UTC
Test commited: r121558
Fix committed: r121561
Comment 3 Mario Carrion 2008-12-20 05:26:00 UTC
Reopening due to reverted commit.
Comment 4 Mario Carrion 2008-12-22 02:52:11 UTC
Created attachment 261742 [details]
Proposed patch.

Seems that .NET is keeping a local copy for: AccessibleDefaultActionDescription, AccessibleDescription, AccessibleName and AccessibleRole; and is not using AccessibleObject.

I've also updated the test (CreatedAccessibilityTest) to match the behavior.
Comment 5 Mario Carrion 2008-12-22 20:34:05 UTC
Patch applied r122002
Comment 6 Mario Carrion 2008-12-29 18:17:39 UTC
Closing.