Instance Method

accessibilityIdentifier()

Returns the element’s identity.

Declaration

optional func accessibilityIdentifier() -> String

Return Value

Returns the unique ID for the accessibility element. It is often used in automated testing.

Discussion

This method is the getter for the NSAccessibilityProtocol protocol’s accessibilityIdentifier property.

See Also

Accessibility Methods

func accessibilityFrame() -> NSRect

Returns the element’s frame in screen coordinates.

Required.

func accessibilityParent() -> Any?

Returns the accessibility element’s parent in the accessibility hierarchy.

Required.

func isAccessibilityFocused() -> Bool

Returns a Boolean value that indicates whether the accessibility element has the keyboard focus.