Type Method

post(element:notification:userInfo:)

Sends a notification and an optional userInfo dictionary to any observing assistive applications.

Declaration

static func post(element: Any, notification: NSAccessibility.Notification, userInfo: [NSAccessibility.NotificationUserInfoKey : Any]?)

Discussion

Sends notification and userInfo to any assistive applications that have registered to receive the notification from the UI object element in your app. The userInfo dictionary values are restricted to the same values to which accessibility attributes are restricted (for a list of these values, see Attributes). The userInfo dictionary can also be nil (most accessibility notifications don’t require it).

See Also

Convenience Functions

var description: String?

Returns a standard description for an action.

static func post(element: Any, notification: NSAccessibility.Notification)

Sends a notification to any observing assistive applications.

static func raiseBadArgumentException(Any!, NSAccessibility.Attribute!, Any!)

Raises an error if the parameter is the wrong type or has an illegal value

Deprecated
func description(with: NSAccessibility.Subrole?) -> String?

Returns a standard description for a role and subrole.

static func description(for: Any) -> String?

Returns a standard role description for a user interface element.

static func setMayContainProtectedContent(Bool) -> Bool

Sets whether the app may have protected content.

static func unignoredChildren(from: [Any]) -> [Any]

Returns a list of unignored accessibility objects, descending the hierarchy if necessary.

static func unignoredChildrenForOnlyChild(from: Any) -> [Any]

Returns a list of unignored accessibility objects, descending the hierarchy if necessary.

static func unignoredDescendant(of: Any) -> Any?

Returns an unignored accessibility object, descending the hierarchy if necessary.

static func unignoredAncestor(of: Any) -> Any?

Returns an unignored accessibility object, ascending the hierarchy if necessary.