AXDescription set in nib cannot be accessed in code

Originator:motownavi
Number:rdar://7496255 Date Originated:12/23/09
Status:Open Resolved:
Product:Mac OS X Product Version:10.6
Classification:Serious Bug Reproducible:Always
 
If a button (or other UI element) has an AXDescription set via a nib, it is set using -[NSAccessibility accessibilitySetOverrideValue:forAttribute:]. This is a problem because it's just about impossible to retrieve that value programatically (you can use the AX APIs but they don't work if the view is not on-screen).

As a specific example, I set a description in IB for a cell:
<ClickHoldButtonCell: 0x1797d0>
(ClickHoldButtonCell is a subclass of NSButtonCell.)

(gdb) po (id)[0x1797d0 accessibilityAttributeNames]
<NSCFArray 0x1837b0>(
AXRole,
AXRoleDescription,
AXHelp,
AXEnabled,
AXFocused,
AXParent,
AXWindow,
AXTopLevelUIElement,
AXPosition,
AXSize,
AXTitle
)

(gdb) po (id)[0x1797d0 accessibilityAttributeValue:@"AXDescription"]
2009-12-22 16:19:12.294 Chromium[17058:813] "AXDescription" attribute unsupported by: <ClickHoldButtonCell: 0x1797d0>

This bug makes it impossible to write view localizers that handle accessibility.

Please either extend the current API to access overriding values, or introduce new API to allow it.

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!