Type Method


Instantiates and configures a new accessibility element.


+ (id)accessibilityElementWithRole:(NSAccessibilityRole)role frame:(NSRect)frame label:(NSString *)label parent:(id)parent;



The new element’s intended role. For a complete list of roles, see Roles.


The element’s frame in screen coordinates. Additionally, you need to set the element’s accessibilityFrameInParentSpace property.


A short description of the new element. Do not include the element’s type in the label (for example, use Play, not Play button). If possible, use a single word. To help ensure that accessibility clients such as VoiceOver read the label with the correct intonation, start the label with a capital letter. Do not put a period at the end. Always localize the label.


The new element’s parent in the accessibility hierarchy.

Return Value

A newly instantiated and initialized accessibility element.


Alternatively, instead of calling this convenience method, you can create an accessibility element and set its accessibilityRole, accessibilityLabel, and accessibilityParent properties. Regardless of how you create the accessibility element, you need to set its accessibilityFrameInParentSpace property to ensure that the element’s frame is updated as its parent moves.

See Also

Supporting the Accessibility Hierarchy

- accessibilityAddChildElement:

Adds a child to the element in the accessibility hierarchy.


Sets the element’s frame in its parent’s coordinate system.