NSAccessibilityURLAttribute does not accept NSURL objects

Originator:markrada26
Number:rdar://11207662 Date Originated:08-Apr-2012 02:41 PM
Status:Open Resolved:
Product:Accessibility Product Version:N/A
Classification:Other Bug Reproducible:N/A
 
08-Apr-2012 02:41 PM Mark Rada:
Summary:

When working with accessibility, the documentation for the NSAccessibilityURLAttribute attribute claims that it takes a NSURL or CFURL object.[1] 

However, if I set the attribute to an NSURL then the attribute does not show up when the UI element is viewed with the Accessibility Inspector. If I then change the attribute to the absoluteString of the NSURL, then it works properly.

[1] http://developer.apple.com/library/mac/#documentation/UserExperience/Reference/Accessibility_RoleAttribute_Ref/Types.html#//apple_ref/doc/uid/TP40007870-Value_Types-URL


Steps to Reproduce:

1. Create a new blank project
2. Add an outlet for the main window
3. Use the outlet to add the NSAccessibilityURLAttribute attribute to the window and set it to an NSURL
4. Run the app and inspect the window with the Accessibility Inspector
5. Change the attribute value to be set to the absoluteString of the NSURL
6. Restart the app and inspect again


Expected Results:

I expect that I can set the attribute to an NSURL object and get an NSURL/CFURL object when I inspect the UI element or access it using the accessibility APIs.


Actual Results:

The attribute requires a string instead.


Regression:

N/A


Notes:

N/A

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!