How do I specify values โโfor the accessibility attribute for a menu item when using a custom view?
I am writing a custom view NSMenuItem
that I would like to make available. When I don't override accessibilityIsIgnored
(so the NSView
default is returned YES
), I can see in the Accessibility Inspector that there is a main object in the accessibility hierarchy AXMenuItem
for the menu item using a custom view, but the main part of the required attributes for the menu items , such as Title , is missing :
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 (object by default AXUnknown
):
The attribute values โโreturned by the override accessibilityAttributeValue:
are applied to that object AXUnknown
underneath AXMenuItem
, not to the desired effect on the object itself AXMenuItem
.
How do I specify missing attribute values โโfor a menu item?
source to share
No one has answered this question yet
Check out similar questions: