See the Overview section above for header-level documentation.
Assistive applications use the functions defined in this header file to communicate with and control accessible applications running in macOS.
Each accessible user interface element in an application is represented by an AXUIElementRef, which is a CFTypeRef. AXUIElementRefs (like all CFTypeRefs) can be used with all the Core Foundation polymorphic functions, such as
All functions defined in this header file return
k on success. If there is some sort of system memory failure, such as the failure to allocate an object, all functions can return
k. In the unlikely event that some process does not fully support the accessibility API, a function can return
In addition, some functions can return the following error codes:
AXError Invalid UIElement
The passed-in AXUIElementRef is invalid. All functions that include an AXUIElementRef parameter can return this error code.
AXError Illegal Argument
At least one of the arguments is illegal (for example, NIL passed in for a pointer).
AXError Cannot Complete
There is a problem with messaging (such as when messaging to the server fails or when the accessible application is unresponsive or waiting for user input). All functions that perform messaging can return this error code.
The accessibility API is disabled. All functions that perform messaging can return this error code.
For more information on the definition and use of accessibility objects and in macOS accessibility support in general, see Accessibility Programming Guide for OS X.