I've tried unsuccessfully in obtaining the title element.
Here's what I did in my cell subclass:
id theTitleUIElement = [super
accessibilityAttributeValue:NSAccessibilityTitleUIElementAttribute];
I mislead you about the line of code above. If the NSAccessibilityTitleUIElementAttribute value is set as an overridden accessibility attribute, the code above *will not* return the overridden accessibility attribute. The overridden value is applied when returning values to assistive apps, not in the NSAccessibility protocol calls themselves.
You could make the NSAccessibilityTitleUIElementAttribute one of the standard accessibility attributes of your cell subclass and add an ivar in the cell subclass that refers to the title UI element, but that may be overkill for what you are trying to do.
Also, don't bother trying to set up the overridden attribute manually, you will not get different results.
Furthermore, I've found it interesting that NSCell subclasses do not provide the
NSAccessibilityTitleUIElementAttribute.? However, NSActionCell subclasses do.
I'll file a documentation enhancement request to beef up the "supported
attributes" table to include NSActionCell as that's a common class to subclass:
Neither NSCell nor NSActionCell have the NSAccessibilityTitleUIElementAttribute
by default.? It is either by a subclass implementing and reporting that attribute
(NSFormCell does this), or else an instance having that attribute value set by
-accessibilitySetOverrideValue:forAttribute: that it would be set.? I'm curious
where you are seeing this distinction.
When IIProgressBarCell derived from NSCell, Acc. Inspector didn't show any title UI element attached to it. Furthermore, by attempting to access that element via my call to super above, it would throw a "attribute not supported" exception. I then changed IIProgressBarCell to derive from NSActionCell. Acc. Inspector then _did_ show the title UI element and my call to super no longer threw an exception (although it still returned a nil).
Note that in the case of deriving from NSCell, one apparently needs to add the NSAccessibilityTitleUIElementAttribute to the list of attributes it handles. But this is not needed in NSActionCell.
Finally, IIProgressBar derives directly from NSControl.
I'll look into this a little more.
Thanks for all your help on this; I'll try the override value tonight and report back.