I am writing a custom NSMenuItem
view that I would like to make accessible. When I do not override accessibilityIsIgnored
(so the NSView
default of YES
is returned), I see in Accessibility Inspector that there is a basic AXMenuItem
object in the accessibility hierarchy for the menu item using the custom view, but it is missing most of the required attributes for menu items such as "Title":
The required attributes are set for menu items that do not use a custom view.
When I override accessibilityIsIgnored
to return NO
, then this results in an additional accessibility object being added to the hierarchy (by default an AXUnknown
object):
Attribute values returned by an override of accessibilityAttributeValue:
are applied to this AXUnknown
object under the AXMenuItem
, rather than the desired effect of being applied to the AXMenuItem
object itself.
How do I supply the missing attribute values for the menu item?