Type Method

raiseBadArgumentException(_:_:_:)

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

Declaration

static func raiseBadArgumentException(_ element: Any!, _ attribute: NSAccessibility.Attribute!, _ value: Any!)

Discussion

Raises an error if a parameter is the wrong type or has an illegal value. This function can also be used to raise an error if an attempt is made to set an attribute's value with the wrong type or an illegal value.

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 post(element: Any, notification: NSAccessibility.Notification, userInfo: [NSAccessibility.NotificationUserInfoKey : Any]?)

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

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.