Mac Developer Library

Developer

ApplicationServices Framework Reference Carbon Accessibility Reference

Options
Deployment Target:

On This Page
Language:

Carbon Accessibility Reference

This document describes the Carbon accessibility API. You use this API to make your Carbon application accessible to assistive applications and technologies, a process called access enabling.

Who Should Read This Document?

All Carbon application developers should read this document for information on specific functions and constants they may need to access-enable their applications. If you’re unsure which parts of the Carbon accessibility API you need, or if you’re new to accessibility in OS X, be sure to read the documents listed in See Also.

Organization of This Document

This document contains API reference in the following sections:

See Also

For more information on accessibility in general and access enabling Carbon applications in particular, you should read the following documents:

Functions

  • Creates an accessibility object that represents a user interface element.

    Declaration

    Objective-C

    AXUIElementRef AXUIElementCreateWithHIObjectAndIdentifier ( HIObjectRef inHIObject, UInt64 inIdentifier );

    Parameters

    inHIObject

    A reference to the user interface element this accessibility object represents. You must pass one of the following reference types: WindowRef, ControlRef, MenuRef, or an HIObjectRef.

    inIdentifier

    A 64-bit identifier to uniquely identify the accessibility object within the user interface element. Pass 0 to indicate the base object identified by the inHIObject parameter.

    Return Value

    The newly created accessibility object.

    Discussion

    If the accessibility object represents part of the substructure of a user interface element, then you must assign it a unique, nonzero identifier value. If the accessibility object represents a complex user interface object as a whole, you must give it the identifier value 0. For example, a segmented view containing five buttons can have six accessibility objects associated with it:

    • The segmented view as a whole, identified by its control reference (ControlRef) and identifier value 0.

    • The five button elements, identified by the segmented view reference and identifiers 1 through 5, respectively.

    The accessibility object is a CFTypeRef object. You can use CFEqual to compare two accessibility objects. You must call CFRelease on the accessibility object when you no longer need it.

    Import Statement

    Objective-C

    @import Carbon;

    Availability

    Available in OS X version 10.2 and later.

    Not available to 64-bit applications.

  • Gets the user interface element the given accessibility object represents.

    Declaration

    Objective-C

    HIObjectRef AXUIElementGetHIObject ( AXUIElementRef inUIElement );

    Parameters

    inHIAccObj

    The accessibility object whose user interface element you want to get.

    Return Value

    A reference to the user interface element associated with the passed-in accessibility object (or NULL if inHIAccObj is not a valid accessibility object).

    Import Statement

    Objective-C

    @import Carbon;

    Availability

    Available in OS X version 10.2 and later.

    Not available to 64-bit applications.

  • Gets the unique identifier associated with an accessibility object.

    Declaration

    Objective-C

    void AXUIElementGetIdentifier ( AXUIElementRef inUIElement, UInt64 *outIdentifier );

    Parameters

    inHIAccObj

    The accessibility object whose identifier you want to get.

    outIdentifier

    A pointer to a 64-bit integer. On return, outIdentifier contains the accessibility object’s identifier. If inHIAccObj is not a valid accessibility object, this function returns 0. Note that 0 is a valid identifier value, so you should not assume that inHIAccObj is invalid if you receive a 0 result.

    Discussion

    If you create your own accessibility objects to represent custom user interface elements or subviews, you can use the identifier this function returns to identify which accessibility object is being referenced.

    Import Statement

    Objective-C

    @import Carbon;

    Availability

    Available in OS X version 10.2 and later.

    Not available to 64-bit applications.

  • Posts a notification for an accessibility object.

    Declaration

    Objective-C

    void AXNotificationHIObjectNotify ( CFStringRef inNotification, HIObjectRef inHIObject, UInt64 inIdentifier );

    Parameters

    inNotification

    The string containing the name of the notification to broadcast.

    inHIObject

    The HIObjectRef portion of the accessibility object for which this notification applies.

    inIdentifier

    The 64-bit identifier portion of the accessibility object for which this notification applies.

    Discussion

    You use the AXNotificationHIObjectNotify function to broadcast changes in an accessibility object to assistive applications. For example, an accessibility object may want to broadcast that the window it represents has moved, or that an attribute value has changed. See Notifications for a list of possible notification constants. Note that accessibility objects representing standard user interface elements automatically send out notifications. In general, you do not need to post your own notifications unless you implement custom user interface elements.

    Import Statement

    Objective-C

    @import Carbon;

    Availability

    Available in OS X version 10.2 and later.

    Not available to 64-bit applications.

  • Returns whether the given HIObject is marked as ignored for accessibility purposes.

    Declaration

    Objective-C

    Boolean HIObjectIsAccessibilityIgnored ( HIObjectRef inObject );

    Parameters

    inObject

    The object whose accessibility ignored state you wish to query.

    Return Value

    A Boolean value indicating whether the HIObject is ignored for accessibility purposes.

    Import Statement

    Objective-C

    @import Carbon;

    Availability

    Available in OS X version 10.2 and later.

    Not available to 64-bit applications.

  • Marks an HIObject as ignored or unignored for accessibility purposes.

    Declaration

    Objective-C

    OSStatus HIObjectSetAccessibilityIgnored ( HIObjectRef inObject, Boolean inIgnored );

    Parameters

    inObject

    The object whose accessibility ignored state you wish to change.

    inIgnored

    A Boolean value indicating whether to ignore the object (TRUE) or not (FALSE).

    Return Value

    An OSStatus signifying success or failure.

    Discussion

    An ignored HIObject is not shown to an assistive application that uses the accessibility APIs to examine the interface of your application. Your application’s accessibility implementation should still report an ignored HIObject as usual. The Carbon accessibility implementation automatically hides ignored HIObjects from assistive applications.

    Note: By default, an HIObject is not ignored.

    Import Statement

    Objective-C

    @import Carbon;

    Availability

    Available in OS X version 10.2 and later.

    Not available to 64-bit applications.

  • Associates an additional accessibility attribute with an accessibility object (a UIElement) that is used to represent a given HIObject or part thereof.

    Declaration

    Objective-C

    OSStatus HIObjectSetAuxiliaryAccessibilityAttribute ( HIObjectRef inHIObject, UInt64 inIdentifier, CFStringRef inAttributeName, CFTypeRef inAttributeData );

    Parameters

    inHIObject

    The HIObjectRef portion of the object-identifier pair to which the attribute data is associated.

    inIdentifier

    The 64-bit identifier portion of the object-identifier pair to which the attribute data is associated. Pass 0 in this parameter when you want to associate the attribute data to the HIObject as a whole. You might do this if, for example, you want to give a description attribute to the object representing a button.

    inAttributeName

    A CFStringRef of the name of the attribute. This string is retained before it is added to the auxiliary attribute storage area.

    inAttributeData

    A CFTypeRef containing the data supplied for the attribute’s value. This data is retained before it is added to the auxiliary attribute storage area; you may release this data after calling this function. If you pass NULL in this parameter, it indicates that the named auxiliary attribute should no longer be associated with the object-identifier pair and any named attribute data previously associated with the object-identifier pair will be released.

    Return Value

    An OSStatus result code. The function returns noErr if it was able to associate the attribute data with the HIObject. If the HIObjectRef is invalid, paramErr is returned.

    Discussion

    This function allows your application to provide the name of and data for an accessibility attribute you want to add to the UIElement that represents a given HIObject-identifier pair. Normally, accessibility attributes are only supplied dynamically through Carbon events, but this function allows you to supply them statically.

    This function only allows you to associate attributes whose values never change. If you need to supply attribute whose values are determined dynamically or whose values are settable, you must install the necessary Carbon accessibility event handlers. See Accessibility Programming Guidelines for Carbon for more information about how this works.

    This function is particularly useful for supplying the values of the kAXDescriptionAttribute, kAXTitleUIElementAttribute, kAXServesAsTitleForUIElementsAttribute, kAXLinkedUIElementsAttribute attributes and other attributes whose values are specific to the layout and usage of your application.

    The auxiliary attribute store (containing attribute values you supply using this function) is consulted during the HIObject’s default handling of the Carbon accessibility attribute events. Therefore, any programmatic handling of a given accessibility attribute has the opportunity to override or block the consultation of the store. In general, if the toolbox or a Carbon event handler can provide the attribute value some other way, the store is not consulted.

    Import Statement

    Objective-C

    @import Carbon;

    Availability

    Available in OS X version 10.4 and later.

    Not available to 64-bit applications.

  • Allows you to override the accessibility objects an HIObject would usually supply as the values of its kAXParentAttribute, kAXWindowAttribute, and kAXTopLevelUIElementAttribute attributes.

    Declaration

    Objective-C

    OSStatus HIObjectOverrideAccessibilityContainment ( HIObjectRef inHIObject, AXUIElementRef inDesiredParent, AXUIElementRef inDesiredWindow, AXUIElementRef inDesiredTopLevelUIElement );

    Parameters

    inHIObject

    The HIObjectRef whose parent attribute you want to override.

    inDesiredParent

    The AXUIElementRef that you want the given HIObject to return as the value of its kAXParentAttribute attribute. This function makes a copy of the AXUIElementRef and you must release the inDesiredParent parameter after you call this function. Passing NULL in this parameter indicates you do not want the HIObject to override the value of its kAXParentAttribute attribute.

    inDesiredWindow

    The AXUIElementRef that you want the given HIObject to return as the value of its kAXWindowAttribute attribute. This function makes a copy of the AXUIElementRef and you must release the inDesiredWindow parameter after you call this function. Passing NULL in this parameter indicates you do not want the HIObject to override the value of its kAXWindowAttribute attribute (if the value exists).

    inDesiredTopLevelUIElement

    The AXUIElementRef that you want the given HIObject to return as the value of its kAXTopLevelUIElementAttribute attribute. This function makes a copy of the AXUIElementRef and you must release the inDesiredTopLevelUIElement parameter after you call this function. Passing NULL in this parameter indicates you do not want the HIObject to override the value of its kAXTopLevelUIElementAttribute attribute (if the value exists).

    Return Value

    An OSStatus result code. If the HIObjectRef is invalid, this function returns paramErr.

    Discussion

    This function allows you to change the parent that the given HIObject would usually supply to the accessibility hierarchy. For example, you might call this function on the menu of a pop-up control to ensure that the menu returns the pop-up control as its parent (rather than the application). Optionally, this function also allows you to change the window and top-level accessibility object the given HIObject would supply.

    If the input HIObject is a standard toolbox object, such as an HIView or a menu, the input HIObject will not be included as an accessibility child of its normal parent. In all other cases, it is the client’s responsibility to ensure that the input HIObject is not included as an accessibility child of its normal parent.

    If the desired AXUIElementRef parent represents an HIView, a menu, or a window, the input HIObject will be included automatically as an accessibility child of the specified parent. In all other cases, it is the client’s responsibility to manually include the input HIObject as an accessibility child of the specified parent. To represent an HIView, a menu, or a window, an AXUIElementRef must contain the appropriate HIObjectRef, as well as an identifier value of 0.

    Note that similar rules don’t apply to the handling of the window and top-level element attributes, because those attributes don’t represent two-way relationships.

    Not every type of HIObject supports a containment override; currently, HIViews, menus, and windows support containment overrides.

    Import Statement

    Objective-C

    @import Carbon;

    Availability

    Available in OS X version 10.4 and later.

    Not available to 64-bit applications.

  • Returns the system-defined role description string for a standard role or role-subrole pair.

    Declaration

    Objective-C

    CFStringRef HICopyAccessibilityRoleDescription ( CFStringRef inRole, CFStringRef inSubrole );

    Parameters

    inRole

    The role for which you want the system-defined description. See Roles for the role strings you can use.

    inSubrole

    The subrole for which you want the system-defined description. See Subroles for the subrole strings you can use. Pass NULL if your accessible object does not have a subrole.

    Return Value

    The system-defined description for the role or role-subrole pair. When you are finished with the CFString containing the description, you must use CFRelease to release it. If there is no system-defined role description associated with the role or role-subrole pair you pass in, this function returns NULL. If you pass in an unknown role or an unknown subrole, this function returns NULL.

    Discussion

    The HICopyAccessibilityRoleDescription function is a convenience function you can use if you have to provide the role description for an accessibility object you create. Instead of hard-coding a role description for an accessibility object, you should use this function to get the current, system-defined role description. This allows you to take advantage of any changes or enhancements Apple might make.

    Import Statement

    Objective-C

    @import Carbon;

    Availability

    Available in OS X version 10.4 and later.

    Not available to 64-bit applications.

  • Returns the system-defined action description string for a standard action.

    Declaration

    Objective-C

    CFStringRef HICopyAccessibilityActionDescription ( CFStringRef inAction );

    Parameters

    inAction

    The action for which you want the system-defined description. See Actions for the action strings you can use.

    Return Value

    The system-defined description for the action. When you are finished with the CFString containing the description, you must use CFRelease to release it. If you pass in an unsupported action, the results are undefined.

    Discussion

    The HICopyAccessibilityActionDescription function is a convenience function you can use to get the current, system-defined action description for a given action. If you create an accessibility object that supports an action, you must supply the action description. Using this function allows you to take advantage of any changes or enhancements Apple might make.

    Import Statement

    Objective-C

    @import Carbon;

    Availability

    Available in OS X version 10.4 and later.

    Not available to 64-bit applications.

Constants

Accessibility Events

  • Define accessibility events (kEventClassAccessibility).

    Declaration

    Swift

    var kEventAccessibleGetChildAtPoint: Int { get } var kEventAccessibleGetFocusedChild: Int { get } var kEventAccessibleGetAllAttributeNames: Int { get } var kEventAccessibleGetAllParameterizedAttributeNames: Int { get } var kEventAccessibleGetNamedAttribute: Int { get } var kEventAccessibleSetNamedAttribute: Int { get } var kEventAccessibleIsNamedAttributeSettable: Int { get } var kEventAccessibleGetAllActionNames: Int { get } var kEventAccessiblePerformNamedAction: Int { get } var kEventAccessibleGetNamedActionDescription: Int { get }

    Objective-C

    enum { kEventAccessibleGetChildAtPoint = 1, kEventAccessibleGetFocusedChild = 2, kEventAccessibleGetAllAttributeNames = 21, kEventAccessibleGetAllParameterizedAttributeNames = 25, kEventAccessibleGetNamedAttribute = 22, kEventAccessibleSetNamedAttribute = 23, kEventAccessibleIsNamedAttributeSettable = 24, kEventAccessibleGetAllActionNames = 41, kEventAccessiblePerformNamedAction = 42, kEventAccessibleGetNamedActionDescription = 44 };

    Constants

    • kEventAccessibleGetChildAtPoint

      kEventAccessibleGetChildAtPoint

      A request sent by an assistive application to get the accessible child of the given accessibility object that contains the given point. The kEventParamMouseLocation parameter contains the location in global coordinates.

      If you handle this event, you use the kEventParamAccessibleChild parameter to return an accessible first-order child of the accessibility object receiving the event. If there is no child at the given point, your handler should leave the kEventParamAccessibleChild parameter empty and return noErr. You must not set the kEventParamAccessibleChild parameter to a grandchild or more distant descendant of the accessible object receiving this event.

      Available in OS X version 10.2 and later.

    • kEventAccessibleGetFocusedChild

      kEventAccessibleGetFocusedChild

      A request sent by an assistive application to get the accessible child of the given accessibility object that is part of the focus chain.

      If you handle this event, you set the kEventParamAccessibleChild parameter to a first-order, accessible child that is focused or is the ancestor of a focused object. If there is no child in the focus chain, your handler should leave the kEventParamAccessibleChild parameter empty and return noErr. You must not set the kEventParamAccessibleChild parameter to a grandchild or more distant descendant of the accessible object receiving this event.

      Available in OS X version 10.2 and later.

    • kEventAccessibleGetAllAttributeNames

      kEventAccessibleGetAllAttributeNames

      A request sent by an assistive application to get the names of all attributes the given accessibility object supports.

      If you handle this event, you create a CFString object for the name of each non-parameterized attribute and add it to the mutable array in the kEventParamAccessibleAttributeNames parameter. If the accessibility object receiving the event supports parameterized attributes, you return them in the handler for the kEventAccessibleGetAllParameterizedAttributeNames event.

      Available in OS X version 10.2 and later.

    • kEventAccessibleGetAllParameterizedAttributeNames

      kEventAccessibleGetAllParameterizedAttributeNames

      A request sent by an assistive application to get the names of all parameterized attributes the given accessibility object supports.

      If you handle this event, you create a CFString object for the name of each parameterized attribute and add it to the mutable array in the kEventParamAccessibleAttributeNames parameter. You must not return any regular, non-parameterized attribute names with this event. Instead, return regular attribute names in the handler for the kEventAccessibleGetAllAttributeNames event.

      Available in OS X version 10.3 and later.

    • kEventAccessibleGetNamedAttribute

      kEventAccessibleGetNamedAttribute

      A request sent by an assistive application to get the value of the given attribute.

      If you handle this event, you determine if the given accessibility object supports the attribute named in the kEventParamAccessibleAttributeName parameter. If it does, you return the attribute’s value in the kEventParamAccessibleAttributeValue parameter. If the accessibility object does not support the attribute, return the eventNotHandledErr error. The type of the kEventParamAccessibleAttributeValue parameter varies with the type of the attribute’s value.

      This event may also include the optional kEventParamAccessibleAttributeParameter parameter that describes the parameters of a parameterized attribute. Note that parameterized attributes were introduced in OS X version 10.3.

      Available in OS X version 10.2 and later.

    • kEventAccessibleSetNamedAttribute

      kEventAccessibleSetNamedAttribute

      A request sent by an assistive application to set the value of the given attribute to the passed-in value.

      If you handle this event, you determine if the given accessibility object supports the attribute named in the kEventParamAccessibleAttributeName parameter and if the attribute is settable. Then, you set the named attribute’s value to the value supplied in the kEventParamAccessibleAttributeValue parameter. If you cannot handle this event (because, for example, the accessibility object does not support this attribute, the attribute is not settable, or the value is not appropriate), return the eventNotHandledErr error.

      Available in OS X version 10.2 and later.

    • kEventAccessibleIsNamedAttributeSettable

      kEventAccessibleIsNamedAttributeSettable

      A request sent by an assistive application to find out if the given attribute’s value can be changed.

      If you handle this event, you determine if the accessibility object supports the given attribute. If it does, you return a Boolean value in the kEventParamAccessibleAttributeSettable parameter that indicates whether the attribute’s value can be changed.

      Available in OS X version 10.2 and later.

    • kEventAccessibleGetAllActionNames

      kEventAccessibleGetAllActionNames

      Sent by an assistive application to find out which actions the given accessibility object supports.

      If you handle this event, you create a CFString object for the name of each action the given accessibility object supports and add it to the mutable array in the kEventParamAccessibleActionNames parameter.

      Available in OS X version 10.2 and later.

    • kEventAccessiblePerformNamedAction

      kEventAccessiblePerformNamedAction

      Sent by an assistive application when it wants the given accessibility object to perform the given action.

      If you handle this event, you determine if the accessibility object supports the action named in the kEventParamAccessibleActionName parameter. If it does, you perform it.

      In OS X version 10.3 and later, this event includes the kEventParamAccessibilityEventQueued parameter, which indicates whether the event was queued. You check the value of this parameter before you perform an action that might result in a call to a routine that may not return immediately. If the event is queued, you can perform such an action without the possibility of causing an assistive application to receive a time-out error waiting for the action to complete. If the event is not queued, your handler can return the eventDeferAccessibilityEventErr to request that it be queued and sent to you later.

      In versions of OS X prior to 10.3, events are always directly dispatched and you should perform a requested action even if it might cause an assistive application to receive a time-out error.

      Available in OS X version 10.2 and later.

    • kEventAccessibleGetNamedActionDescription

      kEventAccessibleGetNamedActionDescription

      Sent by an assistive application to get the human-intelligible name of the given action.

      If you handle this event, you determine if the given accessibility object supports the given action. If it does, you return the value of the action’s description property in the kEventParamAccessibleActionDescription parameter. To do this, you do not create a CFString object for the action description. Instead, you must modify the mutable string object in the kEventParamAccessibleActionDescription parameter to contain the action description.

      Available in OS X version 10.2 and later.

    Discussion

    Table 1 shows the parameters related to accessibility events.

    Table 1Parameter names and types for accessibility event kinds

    Event kind

    Parameter name

    Parameter type

    kEventAccessibleGetChildAtPoint

    kEventParamAccessibleObject

    typeCFTypeRef (an AXUIElementRef)

    kEventParamAccessibleMouseLocation

    typeHIPoint

    kEventParamAccessibleChild

    typeCFTypeRef

    kEventAccessibleGetFocusedChild

    kEventParamAccessibleObject

    typeCFTypeRef (an AXUIElementRef)

    kEventParamAccessibleChild

    typeCFTypeRef

    kEventAccessibleGetAllAttributeNames

    kEventParamAccessibleObject

    typeCFTypeRef (an AXUIElementRef)

    kEventParamAccessibleAttributeNames

    typeCFMutableArrayRef

    kEventAccessibleGetAllParameterizedAttributeNames

    kEventParamAccessibleObject

    typeCFTypeRef (an AXUIElementRef)

    kEventParamAccessibleAttributeNames

    typeCFMutableArrayRef

    kEventAccessibleGetNamedAttribute

    kEventParamAccessibleObject

    typeCFTypeRef (an AXUIElementRef)

    kEventParamAccessibleAttributeName

    typeCFStringRef

    kEventParamAccessibleAttributeParameter (Optional; introduced in OS X version 10.3)

    typeCFTypeRef

    kEventParamAccessibleAttributeValue

    typeCFTypeRef (Varies with the type of the attribute value)

    kEventAccessibleSetNamedAttribute

    kEventParamAccessibleObject

    typeCFTypeRef (an AXUIElementRef)

    kEventParamAccessibleAttributeName

    typeCFStringRef

    kEventParamAccessibleAttribuuteValue

    typeCFTypeRef (Varies with the type of the attribute value)

    kEventAccessibleIsNamedAttributeSettable

    kEventParamAccessibleObject

    typeCFTypeRef (an AXUIElementRef)

    kEventParamAccessibleAttributeName

    typeCFStringRef

    kEventParamAccessibleAttributeSettable

    typeBoolean

    kEventAccessibleGetAllActionNames

    kEventParamAccessibleObject

    typeCFTypeRef

    kEventParamAccessibleActionNames

    typeCFMutableArrayRef

    kEventAccessiblePerformNamedAction

    kEventParamAccessibleObject

    typeCFTypeRef (an AXUIElementRef)

    kEventParamAccessibleActionName

    typeCFStringRef

    kEventParamAccessibleEventQueued (Only in OS X version 10.3 and later)

    typeBoolean

    kEventAccessibleGetNamedActionDescription

    kEventParamAccessibleObject

    typeCFTypeRef (an AXUIElementRef)

    kEventParamAccessibleActionName

    typeCFStringRef

    kEventParamAccessibleActionDescription

    typeCFMutableStringRef

  • Define parameters related to accessibility events.

    Declaration

    Swift

    var kEventParamAccessibleObject: Int { get } var kEventParamAccessibleChild: Int { get } var kEventParamAccessibleAttributeName: Int { get } var kEventParamAccessibleAttributeNames: Int { get } var kEventParamAccessibleAttributeValue: Int { get } var kEventParamAccessibleAttributeSettable: Int { get } var kEventParamAccessibleAttributeParameter: Int { get } var kEventParamAccessibleActionName: Int { get } var kEventParamAccessibleActionNames: Int { get } var kEventParamAccessibleActionDescription: Int { get }

    Objective-C

    enum { kEventParamAccessibleObject = aojb, kEventParamAccessibleChild = achl, kEventParamAccessibleAttributeName = atnm, kEventParamAccessibleAttributeNames = atns, kEventParamAccessibleAttributeValue = atvl, kEventParamAccessibleAttributeSettable = atst, kEventParamAccessibleAttributeParameter = atpa, kEventParamAccessibleActionName = acnm, kEventParamAccessibleActionNames = acns, kEventParamAccessibleActionDescription = acds, kEventParamAccessibleEventQueued = aequ };

    Constants

    • kEventParamAccessibleObject

      kEventParamAccessibleObject

      Specifies an accessibility object. The parameter type is typeCFTypeRef, and the data must be of type AXUIElementRef.

      Available in OS X v10.2 and later.

    • kEventParamAccessibleChild

      kEventParamAccessibleChild

      Specifies the child accessibility object. The parameter type is typeCFTypeRef, and the data must be of type AXUIElementRef.

      Available in OS X v10.2 and later.

    • kEventParamAccessibleAttributeName

      kEventParamAccessibleAttributeName

      Specifies an attribute name. The parameter type is typeCFStringRef.

      Available in OS X v10.2 and later.

    • kEventParamAccessibleAttributeNames

      kEventParamAccessibleAttributeNames

      Specifies an array of attribute names (each of type CFStringRef). The parameter type is typeCFMutableArrayRef.

      Available in OS X v10.2 and later.

    • kEventParamAccessibleAttributeValue

      kEventParamAccessibleAttributeValue

      Specifies the value of an attribute. The parameter type varies according to the attribute. However, this value must be one of the flat data types, such as point, rectangle, integer, float, or any CFType, and must be able to be packaged in a CFPropertyList. In particular, the data should not be a pointer, because you cannot be sure how long an assistive application will retain the value, or in what way it will interpret the value.

      Available in OS X v10.2 and later.

    • kEventParamAccessibleAttributeSettable

      kEventParamAccessibleAttributeSettable

      Specifies whether an attribute is settable. The parameter type is typeBoolean.

      Available in OS X v10.2 and later.

    • kEventParamAccessibleAttributeParameter

      kEventParamAccessibleAttributeParameter

      Specifies the parameters of a parameterized attribute. The parameter type is typeCFTypeRef.

      Available in OS X v10.3 and later.

    • kEventParamAccessibleActionName

      kEventParamAccessibleActionName

      Specifies an action name. The parameter type is typeCFStringRef.

      Available in OS X v10.2 and later.

    • kEventParamAccessibleActionNames

      kEventParamAccessibleActionNames

      Specifies an array of action names (each of type CFStringRef) . The parameter type is typeCFMutableArrayRef.

      Available in OS X v10.2 and later.

    • kEventParamAccessibleActionDescription

      kEventParamAccessibleActionDescription

      Specifes the description of an action. The parameter type is typeCFMutableStringRef.

      Available in OS X v10.2 and later.

    • kEventParamAccessibleEventQueued

      kEventParamAccessibleEventQueued

      Specifies whether the event has been queued. The parameter type is typeBoolean.

  • Defines the event class for accessibility events.

    Declaration

    Swift

    var kEventClassAccessibility: Int { get }

    Objective-C

    enum { kEventClassAccessibility = 'acce', };

    Constants

    • kEventClassAccessibility

      kEventClassAccessibility

      Pass this value for the event class when registering for accessibility events.

      Available in OS X v10.2 and later.

Accessibility Object Constants

  • Define the values an accessibility object’s role attribute can have.

    Declaration

    Objective-C

    #define kAXApplicationRole CFSTR("AXApplication") #define kAXSystemWideRole CFSTR("AXSystemWide") #define kAXWindowRole CFSTR("AXWindow") #define kAXSheetRole CFSTR("AXSheet") #define kAXDrawerRole CFSTR("AXDrawer") #define kAXGrowAreaRole CFSTR("AXGrowArea") #define kAXImageRole CFSTR("AXImage") #define kAXUnknownRole CFSTR("AXUnknown") #define kAXButtonRole CFSTR("AXButton") #define kAXRadioButtonRole CFSTR("AXRadioButton") #define kAXCheckBoxRole CFSTR("AXCheckBox") #define kAXPopUpButtonRole CFSTR("AXPopUpButton") #define kAXMenuButtonRole CFSTR("AXMenuButton") #define kAXTabGroupRole CFSTR("AXTabGroup") #define kAXTableRole CFSTR("AXTable") #define kAXColumnRole CFSTR("AXColumn") #define kAXRowRole CFSTR("AXRow") #define kAXOutlineRole CFSTR("AXOutline") #define kAXBrowserRole CFSTR("AXBrowser") #define kAXScrollAreaRole CFSTR("AXScrollArea") #define kAXScrollBarRole CFSTR("AXScrollBar") #define kAXRadioGroupRole CFSTR("AXRadioGroup") #define kAXListRole CFSTR("AXList") #define kAXGroupRole CFSTR("AXGroup") #define kAXValueIndicatorRole CFSTR ("AXValueIndicator") #define kAXComboBoxRole CFSTR("AXComboBox") #define kAXSliderRole CFSTR("AXSlider") #define kAXIncrementorRole CFSTR("AXIncrementor") #define kAXBusyIndicatorRole CFSTR ("AXBusyIndicator") #define kAXProgressIndicatorRole CFSTR("AXProgressIndicator") #define kAXRelevanceIndicatorRole CFSTR("AXRelevanceIndicator") #define kAXToolbarRole CFSTR("AXToolbar") #define kAXDisclosureTriangleRole CFSTR("AXDisclosureTriangle") #define kAXTextFieldRole CFSTR("AXTextField") #definekAXTextAreaRole CFSTR("AXTextArea") #define kAXStaticTextRole CFSTR("AXStaticText") #define kAXMenuBarRole CFSTR("AXMenuBar") #define kAXMenuBarItemRole CFSTR("AXMenuBarItem") #define kAXMenuRole CFSTR("AXMenu") #define kAXMenuItemRole CFSTR("AXMenuItem") #define kAXSplitGroupRole CFSTR("AXSplitGroup") #define kAXSplitterRole CFSTR("AXSplitter") #define kAXColorWellRole CFSTR("AXColorWell") #define kAXTimeFieldRole CFSTR("AXTimeField") #define kAXDateFieldRole CFSTR("AXDateField") #define kAXHelpTagRole CFSTR("AXHelpTag") #define kAXMatteRole CFSTR("AXMatteRole") #define kAXDockItemRole CFSTR("AXDockItem")

    Constants

    • kAXApplicationRole

      kAXApplicationRole

      An application.

      Available in OS X v10.2 and later.

    • kAXSystemWideRole

      kAXSystemWideRole

      The system-wide accessibility object.

      Available in OS X v10.2 and later.

    • kAXWindowRole

      kAXWindowRole

      A window.

      Available in OS X v10.2 and later.

    • kAXSheetRole

      kAXSheetRole

      A sheet.

      Available in OS X v10.2 and later.

    • kAXDrawerRole

      kAXDrawerRole

      A drawer.

      Available in OS X v10.2 and later.

    • kAXGrowAreaRole

      kAXGrowAreaRole

      A grow control.

      Available in OS X v10.2 and later.

    • kAXImageRole

      kAXImageRole

      An image.

      Available in OS X v10.2 and later.

    • kAXUnknownRole

      kAXUnknownRole

      Generic role value for an unknown accessibility object.

      Available in OS X v10.2 and later.

    • kAXButtonRole

      kAXButtonRole

      A button.

      Available in OS X v10.2 and later.

    • kAXRadioButtonRole

      kAXRadioButtonRole

      A radio button.

      Available in OS X v10.2 and later.

    • kAXCheckBoxRole

      kAXCheckBoxRole

      A check box.

      Available in OS X v10.2 and later.

    • kAXPopUpButtonRole

      kAXPopUpButtonRole

      A pop-up button.

      Available in OS X v10.2 and later.

    • kAXMenuButtonRole

      kAXMenuButtonRole

      A menu button.

      Available in OS X v10.2 and later.

    • kAXTabGroupRole

      kAXTabGroupRole

      A tab view.

      Available in OS X v10.2 and later.

    • kAXTableRole

      kAXTableRole

      A table.

      Available in OS X v10.2 and later.

    • kAXColumnRole

      kAXColumnRole

      A column.

      Available in OS X v10.2 and later.

    • kAXRowRole

      kAXRowRole

      A row.

      Available in OS X v10.2 and later.

    • kAXOutlineRole

      kAXOutlineRole

      An accessibility object that displays row-based, hierarchically structured data, such as the list view in a Finder window.

      Available in OS X v10.2 and later.

    • kAXBrowserRole

      kAXBrowserRole

      An accessibility object that displays column-based, hierarchically structured data, such as the column view in a Finder window.

      Available in OS X v10.2 and later.

    • kAXScrollAreaRole

      kAXScrollAreaRole

      An accessibility object that displays data managed by scrolling controls.

      Available in OS X v10.2 and later.

    • kAXScrollBarRole

      kAXScrollBarRole

      A scroll bar control.

      Available in OS X v10.2 and later.

    • kAXRadioGroupRole

      kAXRadioGroupRole

      A set of radio buttons.

      Available in OS X v10.2 and later.

    • kAXListRole

      kAXListRole

      A list view.

      Available in OS X v10.2 and later.

    • kAXGroupRole

      kAXGroupRole

      A group box. This role can also be used to group other views without any visual indication of the grouping.

      Available in OS X v10.2 and later.

    • kAXValueIndicatorRole

      kAXValueIndicatorRole

      A control that indicates the value of an accessibility object, such as the scroller of a scroll bar control

      Available in OS X v10.2 and later.

    • kAXComboBoxRole

      kAXComboBoxRole

      A combo box control.

      Available in OS X v10.2 and later.

    • kAXSliderRole

      kAXSliderRole

      A slider control.

      Available in OS X v10.2 and later.

    • kAXIncrementorRole

      kAXIncrementorRole

      A stepper control (also known as the “little arrows”).

      Available in OS X v10.2 and later.

    • kAXBusyIndicatorRole

      kAXBusyIndicatorRole

      An asynchronous progress indicator.

      Available in OS X v10.2 and later.

    • kAXProgressIndicatorRole

      kAXProgressIndicatorRole

      A determinate or indeterminate progress indicator.

      Available in OS X v10.2 and later.

    • kAXRelevanceIndicatorRole

      kAXRelevanceIndicatorRole

      A relevance indicator.

      Available in OS X v10.2 and later.

    • kAXToolbarRole

      kAXToolbarRole

      A toolbar.

      Available in OS X v10.2 and later.

    • kAXDisclosureTriangleRole

      kAXDisclosureTriangleRole

      A disclosure triangle control.

      Available in OS X v10.4 and later.

    • kAXTextFieldRole

      kAXTextFieldRole

      A text field.

      Available in OS X v10.2 and later.

    • kAXTextAreaRole

      kAXTextAreaRole

      The editable text area in a control or window.

      Available in OS X v10.2 and later.

    • kAXStaticTextRole

      kAXStaticTextRole

      A string of static text displayed in a window that is not part of any control.

      Available in OS X v10.2 and later.

    • kAXMenuBarRole

      kAXMenuBarRole

      A menu bar.

      Available in OS X v10.2 and later.

    • kAXMenuBarItemRole

      kAXMenuBarItemRole

      A menu bar item.

      Available in OS X v10.3 and later.

    • kAXMenuRole

      kAXMenuRole

      A menu.

      Available in OS X v10.2 and later.

    • kAXMenuItemRole

      kAXMenuItemRole

      A menu item.

      Available in OS X v10.2 and later.

    • kAXSplitGroupRole

      kAXSplitGroupRole

      A split view.

      Available in OS X v10.2 and later.

    • kAXSplitterRole

      kAXSplitterRole

      A splitter bar control.

      Available in OS X v10.2 and later.

    • kAXColorWellRole

      kAXColorWellRole

      A color well.

      Available in OS X v10.2 and later.

    • kAXTimeFieldRole

      kAXTimeFieldRole

      A field that displays time.

      Available in OS X v10.3 and later.

    • kAXDateFieldRole

      kAXDateFieldRole

      A field that displays dates.

      Available in OS X v10.3 and later.

    • kAXHelpTagRole

      kAXHelpTagRole

      A help tag.

      Available in OS X v10.4 and later.

    • kAXMatteRole

      kAXMatteRole

      The outer view that represents the entire contents, including the view through the matte hole, the contents hidden by the matte frame, and the resizing and repositioning controls. An example of an object with a matte role is the iChat icon scaling window.

      Available in OS X v10.4 and later.

    • kAXDockItemRole

      kAXDockItemRole

      An icon that represents an item in the Dock.

      Available in OS X v10.4 and later.

    Discussion

    The value of the role attribute describes what the object is, not what it does. See the “Roles and Associated Attributes” appendix in Accessibility Overview for more information on which attributes are associated with each role.

  • Define the values for an accessibility object’s subrole attribute.

    Declaration

    Objective-C

    #define kAXCloseButtonSubrole CFSTR("AXCloseButton") #define kAXMinimizeButtonSubrole CFSTR("AXMinimizeButton") #define kAXZoomButtonSubrole CFSTR("AXZoomButton") #define kAXToolbarButtonSubrole CFSTR("AXToolbarButton") #define kAXSecureTextFieldSubrole CFSTR("AXSecureTextField") #define kAXTableRowSubrole CFSTR("AXTableRow") #define kAXOutlineRowSubrole CFSTR("AXOutlineRow") #define kAXUnknownSubrole CFSTR("AXUnknown") #define kAXStandardWindowSubrole CFSTR("AXStandardWindow") #define kAXDialogSubrole CFSTR("AXDialog") #define kAXSystemDialogSubrole CFSTR("AXSystemDialog") #define kAXFloatingWindowSubrole CFSTR("AXFloatingWindow") #define kAXSystemFloatingWindowSubrole CFSTR("AXSystemFloatingWindow") #define kAXIncrementArrowSubrole CFSTR("AXIncrementArrow") #define kAXDecrementArrowSubrole CFSTR("AXDecrementArrow") #define kAXIncrementPageSubrole CFSTR("AXIncrementPage") #define kAXDecrementPageSubrole CFSTR("AXDecrementPage") #define kAXSortButtonSubrole CFSTR("AXSortButton") #define kAXSearchFieldSubrole CFSTR("AXSearchField") #define kAXApplicationDockItemSubrole CFSTR("AXApplicationDockItem") #define kAXDocumentDockItemSubrole CFSTR("AXDocumentDockItem") #define kAXFolderDockItemSubrole CFSTR("AXFolderDockItem") #define kAXMinimizedWindowDockItemSubrole CFSTR("AXMinimizedWindowDockItem") #define kAXURLDockItemSubrole CFSTR("AXURLDockItem") #define kAXDockExtraDockItemSubrole CFSTR("AXDockExtraDockItem") #define kAXTrashDockItemSubrole CFSTR("AXTrashDockItem") #define kAXProcessSwitcherListSubrole CFSTR("AXProcessSwitcherList")

    Constants

    • kAXCloseButtonSubrole

      kAXCloseButtonSubrole

      A close button (that is, the red button in a window’s title bar that closes the window).

      Available in OS X v10.2 and later.

    • kAXMinimizeButtonSubrole

      kAXMinimizeButtonSubrole

      A minimize button (that is, the yellow button in a window’s title bar that minimizes the window into the Dock).

      Available in OS X v10.2 and later.

    • kAXZoomButtonSubrole

      kAXZoomButtonSubrole

      A zoom button (that is, the green button in a window’s title bar that adjusts the window’s size).

      Available in OS X v10.2 and later.

    • kAXToolbarButtonSubrole

      kAXToolbarButtonSubrole

      A toolbar button (that is, the button in a window’s title bar that hides and reveals the toolbar).

      Available in OS X v10.2 and later.

    • kAXSecureTextFieldSubrole

      kAXSecureTextFieldSubrole

      A text field intended to contain sensitive data and that displays the user’s input as a series of bullets.

      Available in OS X v10.2 and later.

    • kAXTableRowSubrole

      kAXTableRowSubrole

      A row in a table.

      Available in OS X v10.2 and later.

    • kAXOutlineRowSubrole

      kAXOutlineRowSubrole

      A row in an outline view (see kAXOutlineRole for a description of an outline view).

      Available in OS X v10.2 and later.

    • kAXUnknownSubrole

      kAXUnknownSubrole

      A subrole for an unknown type of window. A window should include a subrole to further define its type. If your window does not conform to an existing subrole, you can use the unknown subrole. Alternatively, you can return the eventNotHandledErr error when your window is asked for its subrole.

      Available in OS X v10.2 and later.

    • kAXStandardWindowSubrole

      kAXStandardWindowSubrole

      A standard window that includes a title bar (that is, not an inspector window or a sheet).

      Available in OS X v10.3 and later.

    • kAXDialogSubrole

      kAXDialogSubrole

      A dialog window, such as an alert.

      Available in OS X v10.3 and later.

    • kAXSystemDialogSubrole

      kAXSystemDialogSubrole

      A system-generated dialog window that floats on the top layer, regardless of which application is frontmost. Use this subrole only when a dialog or alert applies to the system as a whole, such as a shutdown dialog.

      Available in OS X v10.3 and later.

    • kAXFloatingWindowSubrole

      kAXFloatingWindowSubrole

      A utility window.

      Available in OS X v10.3 and later.

    • kAXSystemFloatingWindowSubrole

      kAXSystemFloatingWindowSubrole

      A system-generated utility window.

      Available in OS X v10.3 and later.

    • kAXIncrementArrowSubrole

      kAXIncrementArrowSubrole

      The up arrow of a scroll bar.

      Available in OS X v10.3 and later.

    • kAXDecrementArrowSubrole

      kAXDecrementArrowSubrole

      The down arrow of a scroll bar.

      Available in OS X v10.3 and later.

    • kAXIncrementPageSubrole

      kAXIncrementPageSubrole

      The increment area in the scroll track of a scroll bar.

      Available in OS X v10.3 and later.

    • kAXDecrementPageSubrole

      kAXDecrementPageSubrole

      The decrement area in the scroll track of a scroll bar.

      Available in OS X v10.3 and later.

    • kAXSortButtonSubrole

      kAXSortButtonSubrole

      A column heading button in a list or column view.

      Available in OS X v10.4 and later.

    • kAXSearchFieldSubrole

      kAXSearchFieldSubrole

      A search field.

      Available in OS X v10.4 and later.

    • kAXApplicationDockItemSubrole

      kAXApplicationDockItemSubrole

      An icon in the Dock that represents an application.

      Available in OS X v10.4 and later.

    • kAXDocumentDockItemSubrole

      kAXDocumentDockItemSubrole

      An icon in the Dock that represents a document.

      Available in OS X v10.4 and later.

    • kAXFolderDockItemSubrole

      kAXFolderDockItemSubrole

      An icon in the Dock that represents a folder.

      Available in OS X v10.4 and later.

    • kAXMinimizedWindowDockItemSubrole

      kAXMinimizedWindowDockItemSubrole

      An icon in the Dock that represents a minimized window.

      Available in OS X v10.4 and later.

    • kAXURLDockItemSubrole

      kAXURLDockItemSubrole

      An icon in the Dock that represents a URL.

      Available in OS X v10.4 and later.

    • kAXDockExtraDockItemSubrole

      kAXDockExtraDockItemSubrole

      An icon in the Dock that represents a Dock Extra.

      Available in OS X v10.4 and later.

    • kAXTrashDockItemSubrole

      kAXTrashDockItemSubrole

      The icon in the Dock that represents the Trash.

      Available in OS X v10.4 and later.

    • kAXProcessSwitcherListSubrole

      kAXProcessSwitcherListSubrole

      The display of running applications (processes) that appears when a user presses Command-Tab.

      Available in OS X v10.4 and later.

    Discussion

    A subrole provides a more specific description of an accessibility object’s role. If an accessibility object is of a well-defined subtype, it can include the subrole attribute to provide additional information to an assistive application.

  • Define the attributes available for accessibility objects.

    Declaration

    Objective-C

    //General attributes #define kAXRoleAttribute CFSTR("AXRole") #define kAXSubroleAttribute CFSTR(“AXSubrole”) #define kAXRoleDescriptionAttribute CFSTR("AXRoleDescription") #define kAXHelpAttribute CFSTR("AXHelp") #define kAXTitleAttribute CFSTR("AXTitle") #define kAXValueAttribute CFSTR("AXValue") #define kAXMinValueAttribute CFSTR("AXMinValue") #define kAXMaxValueAttribute CFSTR("AXMaxValue") #define kAXValueIncrementAttribute CFSTR("AXValueIncrement") #define kAXAllowedValuesAttribute CFSTR(“AXAllowedValues”) #define kAXEnabledAttribute CFSTR("AXEnabled") #define kAXFocusedAttribute CFSTR("AXFocused") #define kAXParentAttribute CFSTR("AXParent") #define kAXChildrenAttribute CFSTR("AXChildren") #define kAXSelectedChildrenAttribute CFSTR("AXSelectedChildren") #define kAXVisibleChildrenAttribute CFSTR("AXVisibleChildren") #define kAXWindowAttribute CFSTR("AXWindow") #define kAXTopLevelUIElementAttribute CFSTR(“AXTopLevelUIElement”) #define kAXPositionAttribute CFSTR("AXPosition") #define kAXSizeAttribute CFSTR("AXSize") #define kAXOrientationAttribute CFSTR("AXOrientation") #define kAXDescriptionAttribute CFSTR(“AXDescription”) // Text-specific attributes #define kAXSelectedTextAttribute CFSTR("AXSelectedText") #define kAXVisibleCharacterRangeAttribute CFSTR("AXVisibleCharacterRange") #define kAXSelectedTextRangeAttribute CFSTR("AXSelectedTextRange") #define kAXNumberOfCharactersAttribute CFSTR("AXNumberOfCharacters") #define kAXSharedTextUIElementsAttribute CFSTR("AXSharedTextUIElements") #define kAXSharedCharacterRangeAttribute CFSTR("AXSharedCharacterRange") // Window-specific attributes #define kAXMainAttribute CFSTR("AXMain") #define kAXMinimizedAttribute CFSTR("AXMinimized") #define kAXCloseButtonAttribute CFSTR("AXCloseButton") #define kAXZoomButtonAttribute CFSTR("AXZoomButton") #define kAXMinimizeButtonAttribute CFSTR("AXMinimizeButton") #define kAXToolbarButtonAttribute CFSTR("AXToolbarButton") #define kAXGrowAreaAttribute CFSTR("AXGrowArea") #define kAXProxyAttribute CFSTR("AXProxy") #define kAXModalAttribute CFSTR("AXModal") #define kAXDefaultButtonAttribute CFSTR("AXDefaultButton") #define kAXCancelButtonAttribute CFSTR("AXCancelButton") // Menu-specific attributes #define kAXMenuItemCmdCharAttribute CFSTR("AXMenuItemCmdChar") #define kAXMenuItemCmdVirtualKeyAttribute CFSTR("AXMenuItemCmdVirtualKey") #define kAXMenuItemCmdGlyphAttribute CFSTR("AXMenuItemCmdGlyph") #define kAXMenuItemCmdModifiersAttribute CFSTR("AXMenuItemCmdModifiers") #define kAXMenuItemMarkCharAttribute CFSTR("AXMenuItemMarkChar") #define kAXMenuItemPrimaryUIElementAttribute CFSTR("AXMenuItemPrimaryUIElement") // Application-specific attributes #define kAXMenuBarAttribute CFSTR("AXMenuBar") #define kAXWindowsAttribute CFSTR("AXWindows") #define kAXFrontmostAttribute CFSTR("AXFrontmost") #define kAXHiddenAttribute CFSTR("AXHidden") #define kAXMainWindowAttribute CFSTR("AXMainWindow") #define kAXFocusedWindowAttribute CFSTR("AXFocusedWindow") #define kAXFocusedUIElementAttribute CFSTR("AXFocusedUIElement") // Miscellaneous attributes #define kAXHeaderAttribute CFSTR("AXHeader") #define kAXEditedAttribute CFSTR("AXEdited") #define kAXValueWrapsAttribute CFSTR("AXValueWraps") #define kAXTabsAttribute CFSTR("AXTabs") #define kAXTitleUIElementAttribute CFSTR("AXTitleUIElement") #define kAXHorizontalScrollBarAttribute CFSTR("AXHorizontalScrollBar") #define kAXVerticalScrollBarAttribute CFSTR("AXVerticalScrollBar") #define kAXOverflowButtonAttribute CFSTR("AXOverflowButton") #define kAXFilenameAttribute CFSTR("AXFilename") #define kAXExpandedAttribute CFSTR("AXExpanded") #define kAXSelectedAttribute CFSTR("AXSelected") #define kAXSplittersAttribute CFSTR("AXSplitters") #define kAXNextContentsAttribute CFSTR("AXNextContents") #define kAXDocumentAttribute CFSTR("AXDocument") #define kAXDecrementButtonAttribute CFSTR("AXDecrementButton") #define kAXIncrementButtonAttribute CFSTR("AXIncrementButton") #define kAXPreviousContentsAttribute CFSTR("AXPreviousContents") #define kAXContentsAttribute CFSTR("AXContents") #define kAXIncrementorAttribute CFSTR("AXIncrementor") #define kAXHourFieldAttribute CFSTR("AXHourField") #define kAXMinuteFieldAttribute CFSTR("AXMinuteField") #define kAXSecondFieldAttribute CFSTR("AXSecondField") #define kAXAMPMFieldAttribute CFSTR("AXAMPMField") #define kAXDayFieldAttribute CFSTR("AXDayField") #define kAXMonthFieldAttribute CFSTR("AXMonthField") #define kAXYearFieldAttribute CFSTR("AXYearField") #define kAXColumnTitleAttribute CFSTR("AXColumnTitles") #define kAXURLAttribute CFSTR("AXURL") #define kAXLabelUIElementsAttribute CFSTR("AXLabelUIElements") #define kAXLabelValueAttribute CFSTR("AXLabelValue") #define kAXShownMenuUIElementAttribute CFSTR("AXShownMenuUIElement") #define kAXServesAsTitleForUIElementsAttribute CFSTR("AXServesAsTitleForUIElements") #define kAXLinkedUIElementsAttribute CFSTR("AXLinkedUIElements") // Table and outline view attributes #define kAXRowsAttribute CFSTR("AXRows") #define kAXVisibleRowsAttribute CFSTR("AXVisibleRows") #define kAXSelectedRowsAttribute CFSTR("AXSelectedRows") #define kAXColumnsAttribute CFSTR("AXColumns") #define kAXVisibleColumnsAttribute CFSTR("AXVisibleColumns") #define kAXSelectedColumnsAttribute CFSTR("AXSelectedColumns") #define kAXSortDirectionAttribute CFSTR("AXSortDirection") #define kAXColumnHeaderUIElementsAttribute CFSTR("AXColumnHeaderUIElements") #define kAXIndexAttribute CFSTR("AXIndex") #define kAXDisclosingAttribute CFSTR("AXDisclosing") #define kAXDisclosedRowsAttribute CFSTR("AXDisclosedRows") #define kAXDisclosedByRowAttribute CFSTR("AXDisclosedByRow") // Matte attributes #define kAXMatteHoleAttribute CFSTR("AXMatteHole") #define kAXMatteContentUIElementAttribute CFSTR("AXMatteContentUIElement") // Dock attributes #define kAXIsApplicationRunningAttribute CFSTR("AXIsApplicationRunning") // System-wide attributes #define kAXFocusedApplicationAttribute CFSTR("AXFocusedApplication")

    Constants

    • kAXRoleAttribute

      kAXRoleAttribute

      The role, or type, of this accessibility object (for example, AXButton). This string is for identification purposes only and does not need to be localized. All accessibility objects must include this attribute.

      Available in OS X v10.2 and later.

    • kAXSubroleAttribute

      kAXSubroleAttribute

      The subrole of this accessibility object (for example, AXCloseButton). The subrole provides additional information about the accessibility object to an assistive application. This string is for identification purposes only and does not need to be localized. This attribute is necessary only for an accessibility object whose AXRole attribute does not adequately describe its meaning.

      Available in OS X v10.2 and later.

    • kAXRoleDescriptionAttribute

      kAXRoleDescriptionAttribute

      A localized string describing the role (for example, “button”). This string must be readable by (or speakable to) the user. All accessibility objects must include this attribute. To get the system-defined role description string for a given role, use the HICopyAccessibilityRoleDescription function.

      Available in OS X v10.2 and later.

    • kAXHelpAttribute

      kAXHelpAttribute

      A localized string containing help text for this accessibility object. An accessibility object that provides help information should include this attribute.

      Available in OS X v10.2 and later.

    • kAXTitleAttribute

      kAXTitleAttribute

      The title associated with this accessibility object. A title is text that the object displays as part of its visual interface, such as the text “OK” on an OK button. This string must be localizable and human-intelligible. This attribute is required for all accessibility objects that display a string in their visual interfaces.

      Available in OS X v10.2 and later.

    • kAXValueAttribute

      kAXValueAttribute

      The value associated with this accessibility object (for example, a scroller value). The value of an accessibility object is user-modifiable and represents the setting of the associated user interface element, such as the contents of an editable text field or the position of a scroller. This attribute is required if an accessibility object’s value state conveys information to the user or if the user can define the value of the object.

      Available in OS X v10.2 and later.

    • kAXMinValueAttribute

      kAXMinValueAttribute

      The minimum value this accessibility object can display (for example, the minimum value of a scroller control). This attribute is used only in conjunction with the AXValue attribute.

      Available in OS X v10.2 and later.

    • kAXMaxValueAttribute

      kAXMaxValueAttribute

      The maximum value this accessibility object can display (for example, the maximum value of a scroller control). This attribute is used only in conjunction with the AXValue attribute.

      Available in OS X v10.2 and later.

    • kAXValueIncrementAttribute

      kAXValueIncrementAttribute

      The amount an accessibility object’s value changes as the result of a single action (for example, how far a scroller travels with one mouse click). This attribute is used only in conjunction with the AXValue attribute.

      Available in OS X v10.2 and later.

    • kAXAllowedValuesAttribute

      kAXAllowedValuesAttribute

      An array of the allowed values for an accessibility object. This attribute indicates the subset of values to which an accessibility object can be set. For example, a slider control displays a large range of values, but the accessibility object representing the slider can be set to only a few specific values within that range. This attribute is used only in conjunction with the AXValue attribute.

      Available in OS X v10.4 and later.

    • kAXEnabledAttribute

      kAXEnabledAttribute

      Indicates whether the user can interact with the accessibility object. For example, the AXEnabled attribute of a disabled button is false. This attribute is required for accessibility objects that represent views, menus, and menu items. This attribute is not required for accessibility objects that represent windows.

      Available in OS X v10.2 and later.

    • kAXFocusedAttribute

      kAXFocusedAttribute

      Indicates whether the accessibility object currently has the keyboard focus. Note that you can set the value of the AXFocused attribute to true to accept keyboard focus. This attribute is required for all accessibility objects representing elements that can receive keyboard focus.

      Available in OS X v10.2 and later.

    • kAXParentAttribute

      kAXParentAttribute

      This accessibility object’s parent object in the accessibility hierarchy. This attribute is required for all accessibility objects except the application-level accessibility object.

      Available in OS X v10.2 and later.

    • kAXChildrenAttribute

      kAXChildrenAttribute

      An array of the first-order accessibility objects contained by this accessibility object. An accessibility object may be a member of only one AXChildren array. This attribute is required for all accessibility objects that contain accessible child objects.

      Available in OS X v10.2 and later.

    • kAXSelectedChildrenAttribute

      kAXSelectedChildrenAttribute

      An array of selected first-order accessibility objects contained by this accessibility object. For example, the selected subelements of a list view are contained in the AXSelectedChildren array of the list view’s accessibility object. The members of the AXSelectedChildren array are a subset of the members of this accessibility object’s AXChildren array. This attribute is required for accessibility objects that contain selectable child objects.

      Available in OS X v10.2 and later.

    • kAXVisibleChildrenAttribute

      kAXVisibleChildrenAttribute

      An array of first-order accessibility objects contained by this accessibility object that are visible to a sighted user. For example, a list view’s AXVisibleChildren array would contain the list’s subelements that are currently scrolled into view. The members of the AXVisibleChildren array are a subset of the members of this accessibility object’s AXChildren array. This attribute is recommended for accessibility objects whose child objects can be scrolled out of view or otherwise obscured.

      Available in OS X v10.2 and later.

    • kAXWindowAttribute

      kAXWindowAttribute

      The window element that contains this accessibility object. An accessibility object that is contained in a window includes this attribute so an assistive application easily can find the window without having to step through all intervening objects in the accessibility hierarchy. Note that the value of the AXWindow attribute must be an accessibility object that represents a window, not a sheet or drawer. For a similar attribute that is less restrictive, see kAXTopLevelUIElementAttribute. The AXWindow attribute is required for all accessibility elements whose parent or more distant ancestor represents a window.

      Available in OS X v10.2 and later.

    • kAXPositionAttribute

      kAXPositionAttribute

      The global screen coordinates of the top-left corner of this accessibility object. Note that the coordinates 0,0 represent the top-left corner of the screen that displays the menu bar. All accessibility objects that have a screen position (in other words, are visible on the screen) should include this attribute.

      Available in OS X v10.2 and later.

    • kAXTopLevelUIElementAttribute

      kAXTopLevelUIElementAttribute

      The window, sheet, or drawer element that contains this accessibility object. An accessibility object that is contained in a window, sheet, or drawer includes this attribute so an assistive application easily can find that element without having to step through all intervening objects in the accessibility hierarchy. This attribute is required for all accessibility objects whose parent or more distant ancestor represents a window, drawer, or sheet.

      Available in OS X v10.4 and later.

    • kAXSizeAttribute

      kAXSizeAttribute

      The vertical and horizontal dimensions of this accessibility object. This attribute is required for all accessibility objects that are visible on the screen.

      Available in OS X v10.2 and later.

    • kAXOrientationAttribute

      kAXOrientationAttribute

      Indicates whether this accessibility object is displayed or interacted with in a vertical or a horizontal manner. The interpretation of an element, such as a slider, can change depending on whether it is oriented vertically or horizontally. Using the value of this attribute, an assistive application can communicate this information to the user. This attribute is required for any accessibility object, such as a scroller or slider, whose semantic meaning varies with the object’s orientation.

      Available in OS X v10.2 and later.

    • kAXDescriptionAttribute

      kAXDescriptionAttribute

      The purpose of this accessibility object. The description string must be localizable and human-intelligible and it must be all lower case and include no punctuation. The string should briefly describe this accessibility object’s purpose, without including the object’s role description. This attribute is required for all accessibility objects that do not provide enough descriptive information in the title attribute.

      Available in OS X v10.4 and later.

    • kAXSelectedTextAttribute

      kAXSelectedTextAttribute

      The currently selected text within this accessibility object. This attribute is required for all accessibility objects that represent editable text elements.

      Available in OS X v10.2 and later.

    • kAXSelectedTextRangeAttribute

      kAXSelectedTextRangeAttribute

      Indicates the range of characters (not bytes) that defines the currently selected text within this accessibility object. This attribute is required for all accessibility objects that represent editable text elements.

      Available in OS X v10.2 and later.

    • kAXVisibleCharacterRangeAttribute

      kAXVisibleCharacterRangeAttribute

      Indicates the range of characters (not bytes) that are scrolled into view within this accessibility object. This attribute is required only for accessibility objects that represent an editable text area (objects of role AXTextArea), not for any other text-related accessibility objects.

      Available in OS X v10.3 and later.

    • kAXNumberOfCharactersAttribute

      kAXNumberOfCharactersAttribute

      The total number of characters (not bytes) in the editable text element represented by this accessibility object. This attribute is required for all accessibility objects that represent editable text elements.

      Available in OS X v10.3 and later.

    • kAXSharedTextUIElementsAttribute

      kAXSharedTextUIElementsAttribute

      An array of accessibility objects with which the text of this accessibility object is shared. In a multi-column document, for example, each column may be represented by a separate accessibility object. However, the text in the document may flow from one column to the other. You get the value of this attribute if you need to know with which accessibility object this accessibility object shares its text. This attribute is recommended for sets of accessibility objects that share text in a single window. (See kAXSharedCharacterRange for a related attribute.)

      Available in OS X v10.4 and later.

    • kAXSharedCharacterRangeAttribute

      kAXSharedCharacterRangeAttribute

      The portion of shared text this accessibility object currently displays. In a multi-column document, for example, each column may be represented by a separate accessibility object. However, the text in the document may flow from one column to the other. Get the value of this attribute if you need to know the specific range of characters this accessibility object currently displays. This attribute is recommended for sets of accessibility objects that share text in a single window. (See kAXSharedTextUIElementsAttribute for a related attribute.)

      Available in OS X v10.4 and later.

    • kAXMainAttribute

      kAXMainAttribute

      Indicates whether the window represented by this accessibility object is the main application window. Note that a window can be main even though it does not have keyboard focus. This attribute is recommended for all accessibility objects that represent windows.

      Available in OS X v10.2 and later.

    • kAXMinimizedAttribute

      kAXMinimizedAttribute

      Indicates whether the window represented by this accessibility object is currently minimized in the Dock. This attribute is recommended for all accessibility objects that represent windows that can be minimized.

      Available in OS X v10.2 and later.

    • kAXCloseButtonAttribute

      kAXCloseButtonAttribute

      The close button of the window represented by this accessibility object. An accessibility object includes this attribute to help an assistive application easily find a window’s close button, without having to traverse the accessibility hierarchy. This attribute is recommended for all accessibility objects that represent windows that contain a close button.

      Available in OS X v10.2 and later.

    • kAXZoomButtonAttribute

      kAXZoomButtonAttribute

      The zoom button of the window represented by this accessibility object. An accessibility object includes this attribute to help an assistive application easily find a window’s zoom button, without having to traverse the accessibility hierarchy. This attribute is recommended for all accessibility objects that represent windows that contain a zoom button.

      Available in OS X v10.2 and later.

    • kAXMinimizeButtonAttribute

      kAXMinimizeButtonAttribute

      The minimize button of the window represented by this accessibility object. An accessibility object includes this attribute to help an assistive application easily find a window’s minimize button, without having to traverse the accessibility hierarchy. This attribute is recommended for all accessibility objects that represent windows that contain a minimize button.

      Available in OS X v10.2 and later.

    • kAXToolbarButtonAttribute

      kAXToolbarButtonAttribute

      The toolbar button of the window represented by this accessibility object. An accessibility object includes this attribute to help an assistive application easily find a window’s toolbar button, without having to traverse the accessibility hierarchy. This attribute is recommended for all accessibility objects that represent windows that contain a toolbar button.

      Available in OS X v10.2 and later.

    • kAXGrowAreaAttribute

      kAXGrowAreaAttribute

      The grow area of the window represented by this accessibility object. An accessibility object includes this attribute to help an assistive application easily find a window’s grow area, without having to traverse the accessibility hierarchy. This attribute is recommended for all accessibility objects that represent windows that contain a grow area.

      Available in OS X v10.2 and later.

    • kAXProxyAttribute

      kAXProxyAttribute

      The document proxy of the window represented by this accessibility object. An accessibility object includes this attribute to help an assistive application easily find a window’s document proxy, without having to traverse the accessibility hierarchy. This attribute is recommended for all accessibility objects that represent windows that display a document proxy.

      Available in OS X v10.2 and later.

    • kAXModalAttribute

      kAXModalAttribute

      Indicates whether the window represented by this accessibility object is modal. This attribute is recommended for all accessibility objects that represent windows.

      Available in OS X v10.3 and later.

    • kAXDefaultButtonAttribute

      kAXDefaultButtonAttribute

      The default button of the window represented by this accessibility object. An accessibility object includes this attribute to help an assistive application easily find a window’s default button, without having to traverse the accessibility hierarchy. This attribute is recommended for all accessibility objects that represent windows that contain a default button.

      Available in OS X v10.3 and later.

    • kAXCancelButtonAttribute

      kAXCancelButtonAttribute

      The cancel button of the window represented by this accessibility object. An accessibility object includes this attribute to help an assistive application easily find a window’s cancel button, without having to traverse the accessibility hierarchy. This attribute is recommended for all accessibility objects that represent windows that contain a cancel button.

      Available in OS X v10.3 and later.

    • kAXMenuItemCmdCharAttribute

      kAXMenuItemCmdCharAttribute

      The primary key in the keyboard shortcut for the command represented by this accessibility object. For example, “O” is the primary key in the keyboard shortcut for the Open command.

      Available in OS X v10.2 and later.

    • kAXMenuItemCmdVirtualKeyAttribute

      kAXMenuItemCmdVirtualKeyAttribute

      The key code associated with the physical key in the keyboard shortcut for the command represented by this accessibility object. For example, Return and Enter are different physical keys that can produce the same character. If an assistive application needs to be able to distinguish between them, it can view the virtual key codes.

      Available in OS X v10.2 and later.

    • kAXMenuItemCmdGlyphAttribute

      kAXMenuItemCmdGlyphAttribute

      The glyph displayed for a physical key in the keyboard shortcut for the command represented by this accessibility object, if it is different from the visible result of pressing the key. The Delete key, for example, produces an invisible character, but it is associated with a visible glyph.

      Available in OS X v10.2 and later.

    • kAXMenuItemCmdModifiersAttribute

      kAXMenuItemCmdModifiersAttribute

      An integer mask that represents the modifier keys held down in the keyboard shortcut for the command represented by this accessibility object.

      Available in OS X v10.2 and later.

    • kAXMenuItemMarkCharAttribute

      kAXMenuItemMarkCharAttribute

      The symbol displayed to the left of the menu item represented by this accessibility object. For example, in the Window menu, a checkmark appears next to the active document’s name. For more information on the standard symbols that can appear next to menu items, see Apple Human Interface Guidelines.

      Available in OS X v10.2 and later.

    • kAXMenuItemPrimaryUIElementAttribute

      kAXMenuItemPrimaryUIElementAttribute

      The accessibility object representing the primary menu item in a group of dynamic menu items. Dynamic menu item are commands that change when the user presses a modifier key, such as Minimize Window and Minimize All Windows. Within each group, each dynamic menu item’s accessibility object includes this attribute and in each case the attribute’s value is the accessibility object representing the primary menu item.

      Available in OS X v10.4 and later.

    • kAXMenuBarAttribute

      kAXMenuBarAttribute

      The accessibility object representing the menu bar of this application. The application-level accessibility object includes this attribute to help an assistive application easily find the menu bar. This attribute is recommended for all application-level accessibility objects.

      Available in OS X v10.2 and later.

    • kAXWindowsAttribute

      kAXWindowsAttribute

      An array of accessibility objects representing this application’s windows. This attribute is recommended for all application-level accessibility objects.

      Available in OS X v10.2 and later.

    • kAXFrontmostAttribute

      kAXFrontmostAttribute

      Indicates whether the application represented by this accessibility object is active. This attribute is recommended for all application-level accessibility objects.

      Available in OS X v10.2 and later.

    • kAXHiddenAttribute

      kAXHiddenAttribute

      Indicates whether the application represented by this accessibility object is hidden. This attribute is recommended for all application-level accessibility objects.

      Available in OS X v10.2 and later.

    • kAXMainWindowAttribute

      kAXMainWindowAttribute

      The accessibility object representing this application’s main window. This attribute is recommended for all application-level accessibility objects.

      Available in OS X v10.2 and later.

    • kAXFocusedWindowAttribute

      kAXFocusedWindowAttribute

      The accessibility object that represents the currently focused window of this application. This attribute is recommended for all application-level accessibility objects.

      Available in OS X v10.2 and later.

    • kAXFocusedUIElemenAttribute

      kAXFocusedUIElemenAttribute

      The accessibility object that represents the currently focused user interface element in this application. This attribute is recommended for all application-level accessibility objects.

    • kAXHeaderAttribute

      kAXHeaderAttribute

      The accessibility object representing the header element of this accessibility object. For example, a table or an outline view can have a header element that displays column or row headers. An accessibility object includes this attribute to help an assistive application easily find embedded header information. This attribute is recommended for all accessibility objects that represent elements that display header information.

      Available in OS X v10.2 and later.

    • kAXEditedAttribute

      kAXEditedAttribute

      Indicates whether the user interface element represented by this accessibility object has been edited. For example, a document window indicates it has been edited by displaying a black dot in its close button. This attribute is recommended for all accessibility objects that represent editable user interface elements.

      Available in OS X v10.2 and later.

    • kAXTitleUIElementAttribute

      kAXTitleUIElementAttribute

      An accessibility object that represents a static text title associated with another accessibility object.

      Available in OS X v10.2 and later.

    • kAXValueWrapsAttribute

      kAXValueWrapsAttribute

      Indicates whether the value displayed in the user interface element represented by this accessibility object wraps around.

      Available in OS X v10.2 and later.

    • kAXTabsAttribute

      kAXTabsAttribute

      An array of accessibility objects representing the tabs this accessibility object displays. An accessibility object includes this attribute to help an assistive application easily distinguish a tab view’s tabs from its other children. This attribute is recommended for all accessibility objects that represent tab views.

      Available in OS X v10.2 and later.

    • kAXHorizontalScrollBarAttribute

      kAXHorizontalScrollBarAttribute

      The horizontal scroll bar displayed by the user interface element this accessibility object represents. This is a convenience attribute an assistive application can use easily to find the scroll bar without traversing the accessibility hierarchy. This attribute is recommended for all accessibility objects that display a horizontal scroll bar.

      Available in OS X v10.2 and later.

    • kAXVerticalScrollBarAttribute

      kAXVerticalScrollBarAttribute

      The vertical scroll bar displayed by the user interface element this accessibility object represents. This is a convenience attribute an assistive application can use easily to find the scroll bar without traversing the accessibility hierarchy. This attribute is recommended for all accessibility objects that display a vertical scroll bar.

      Available in OS X v10.2 and later.

    • kAXOverflowButtonAttribute

      kAXOverflowButtonAttribute

      Identifies which child of an accessibility object representing a toolbar is the overflow button (if any). This attribute is optional.

      Available in OS X v10.2 and later.

    • kAXFilenameAttribute

      kAXFilenameAttribute

      The filename associated with this accessibility object. This attribute is optional.

      Available in OS X v10.2 and later.

    • kAXExpandedAttribute

      kAXExpandedAttribute

      Indicates whether the menu displayed by the combo box or pop-up menu represented by this accessibility object is currently expanded. This attribute is recommended for all accessibility objects that display a pop-up menu.

      Available in OS X v10.2 and later.

    • kAXSelectedAttribute

      kAXSelectedAttribute

      Indicates whether the row or column element represented by this accessibility object is selected. This attribute is recommended for all accessibility objects that represent selectable rows or columns.

      Available in OS X v10.2 and later.

    • kAXSplittersAttribute

      kAXSplittersAttribute

      An array of views and splitter bar elements displayed by the split view represented by this accessibility object. This is a convenience attribute that helps an assistive application easily find these elements.

      Available in OS X v10.2 and later.

    • kAXNextContentsAttribute

      kAXNextContentsAttribute

      The group of accessibility objects representing the elements on one side of a splitter bar. (Which side of the splitter bar is considered “next” is determined by the value of the splitter bar’s orientation attribute.) This attribute is recommended for an accessibility object that represents the splitter bar in a split view.

      Available in OS X v10.2 and later.

    • kAXPreviousContentsAttribute

      kAXPreviousContentsAttribute

      The group of accessibility objects representing the elements on one side of a splitter bar. (Which side of the splitter bar is considered “previous” is determined by the value of the splitter bar’s orientation attribute.) This attribute is recommended for an accessibility object that represents the splitter bar in a split view.

      Available in OS X v10.2 and later.

    • kAXDocumentAttribute

      kAXDocumentAttribute

      The URL of the open document represented by this accessibility object. This attribute represents the URL as a string object.

      Available in OS X v10.2 and later.

    • kAXIncrementButtonAttribute

      kAXIncrementButtonAttribute

      The increment element associated with the user interface object this accessibility object represents. This attribute can be used to provide convenient access to the increment area of a custom user interface object. To refer to the increment button associated with a date or time field, see kAXIncrementorAttribute.

      Available in OS X v10.2 and later.

    • kAXDecrementButtonAttribute

      kAXDecrementButtonAttribute

      The decrement element associated with the user interface object this accessibility object represents. This attribute can be used to provide convenient access to the decrement area of a custom user interface object.

      Available in OS X v10.2 and later.

    • kAXContentsAttribute

      kAXContentsAttribute

      Content-containing accessibility objects that are children of this accessibility object. For example, a tab view contains children that represent both the tab controls and the content displayed for each tab. The accessibility object representing a tab view can include only the content-display children in its AXContents attribute to help an assistive application provide more targeted information to the user. This attribute is recommended for any accessibility object whose children represent both content and control elements.

      Available in OS X v10.2 and later.

    • kAXIncrementorAttribute

      kAXIncrementorAttribute

      The incrementor of a time or date field represented by this accessibility object. This attribute is required for accessibility objects that represent time or date field elements that display an incrementor.

      Available in OS X v10.3 and later.

    • kAXHourFieldAttribute

      kAXHourFieldAttribute

      The hour field of a time field represented by this accessibility object. This attribute is required for accessibility objects that represent time fields that display hours.

      Available in OS X v10.3 and later.

    • kAXMinuteFieldAttribute

      kAXMinuteFieldAttribute

      The minute field of a time field represented by this accessibility object. This attribute is required for accessibility objects that represent time fields that display minutes.

      Available in OS X v10.3 and later.

    • kAXSecondFieldAttribute

      kAXSecondFieldAttribute

      The second field of a time field represented by this accessibility object. This attribute is required for accessibility objects that represent time fields that display seconds.

      Available in OS X v10.3 and later.

    • kAXAMPMFieldAttribute

      kAXAMPMFieldAttribute

      The AM/PM field of a time field represented by this accessibility object. This attribute is required for accessibility objects that represent time fields that display AM/PM settings.

      Available in OS X v10.3 and later.

    • kAXDayFieldAttribute

      kAXDayFieldAttribute

      The day field of a time field represented by this accessibility object. This attribute is required for accessibility objects that represent time fields that display days.

      Available in OS X v10.3 and later.

    • kAXMonthFieldAttribute

      kAXMonthFieldAttribute

      The month field of a time field represented by this accessibility object. This attribute is required for accessibility objects that represent time fields that display months.

      Available in OS X v10.3 and later.

    • kAXYearFieldAttribute

      kAXYearFieldAttribute

      The year field of a time field represented by this accessibility object. This attribute is required for accessibility objects that represent time fields that display years.

      Available in OS X v10.3 and later.

    • kAXColumnTitleAttribute

      kAXColumnTitleAttribute

      The title of the column element represented by this accessibility object. Note that, because column titles are sometimes the children of a separate header element, the value of this attribute can refer to an element that is not a child of the column accessibility object.

      Available in OS X v10.4 and later.

    • kAXURLAttribute

      kAXURLAttribute

      The URL that describes the location of the document or application represented by this accessibility object.

      Available in OS X v10.3 and later.

    • kAXLabelUIElementsAttribute

      kAXLabelUIElementsAttribute

      An array of accessibility objects representing the labels displayed near the control represented by this accessibility object. For example, a slider control might display labels that indicate the range of values the slider can represent. Because these labels are not displayed as part of the slider’s visual interface, an assistive application does not know they are associated with the slider. By including accessibility objects representing the labels in this attribute, you make this association explicit.

      Available in OS X v10.4 and later.

    • kAXLabelValueAttribute

      kAXLabelValueAttribute

      The value of the label represented by this accessibility object. This attribute is required for all accessibility objects that represent labels.

      Available in OS X v10.4 and later.

    • kAXShownMenuUIElementAttribute

      kAXShownMenuUIElementAttribute

      An array of accessibility objects that represent the contextual or Dock menus provided by this accessibility object.

      Available in OS X v10.4 and later.

    • kAXServesAsTitleForUIElementsAttribute

      kAXServesAsTitleForUIElementsAttribute

      An array of accessibility objects for which this accessibility object serves as the title. For example, a piece of static text can serve as a title for one or more user interface elements. Because this static text string is not displayed as part of any user interface element’s visual interface, an assistive application does not know the title is associated with user interface elements. By including this attribute in the accessibility object representing the title, you specify the accessibility objects with which this title is associated.

      Available in OS X v10.4 and later.

    • kAXLinkedUIElementsAttribute

      kAXLinkedUIElementsAttribute

      An array of accessibility objects with which this accessibility object is related. For example, the contents of a list item can be displayed in another pane or window. The list item and the separately displayed contents are related, but this relationship may not be apparent to an assistive application. To make such a relationship explicit, you include this attribute in the accessibility objects representing the related user interface elements.

      Available in OS X v10.4 and later.

    • kAXRowsAttribute

      kAXRowsAttribute

      An array of the accessibility objects representing the rows in this table or outline view.

      Available in OS X v10.2 and later.

    • kAXVisibleRowsAttribute

      kAXVisibleRowsAttribute

      An array of the accessibility objects representing the currently visible rows in this table or outline view.

      Available in OS X v10.2 and later.

    • kAXSelectedRowsAttribute

      kAXSelectedRowsAttribute

      An array of the accessibility objects representing the currently selected rows in this table or outline view.

      Available in OS X v10.2 and later.

    • kAXColumnsAttribute

      kAXColumnsAttribute

      An array of the accessibility objects representing the columns in this browser view.

      Available in OS X v10.2 and later.

    • kAXVisibleColumnsAttribute

      kAXVisibleColumnsAttribute

      An array of the accessibility objects representing the currently visible columns in this browser view.

      Available in OS X v10.2 and later.

    • kAXSelectedColumnsAttribute

      kAXSelectedColumnsAttribute

      An array of the accessibility objects representing the currently selected columns in this browser view.

      Available in OS X v10.2 and later.

    • kAXSortDirectionAttribute

      kAXSortDirectionAttribute

      The sort direction of this accessibility object’s contents. For example, a list view’s contents may be sorted in ascending or descending order.

      Available in OS X v10.2 and later.

    • kAXColumnHeaderUIElementsAttribute

      kAXColumnHeaderUIElementsAttribute

      An array of accessibility objects representing the column headers of this table or browser view.

      Available in OS X v10.4 and later.

    • kAXIndexAttribute

      kAXIndexAttribute

      The index of the row or column represented by this accessibility object.

      Available in OS X v10.4 and later.

    • kAXDisclosingAttribute

      kAXDisclosingAttribute

      Indicates whether a row in an outline view represented by this accessibility object has an open or closed disclosure triangle. true indicates an open disclosure triangle; false indicates a closed disclosure triangle.

      Available in OS X v10.2 and later.

    • kAXDisclosedRowsAttribute

      kAXDisclosedRowsAttribute

      An array of accessibility objects representing the disclosed rows of this user interface element.

      Available in OS X v10.2 and later.

    • kAXDisclosedByRowAttribute

      kAXDisclosedByRowAttribute

      The accessibility object representing the disclosing row.

      Available in OS X v10.2 and later.

    • kAXMatteHoleAttribute

      kAXMatteHoleAttribute

      The accessibility object that represents the area available to the user through the matte hole.

      Available in OS X v10.4 and later.

    • kAXMatteContentUIElementAttribute

      kAXMatteContentUIElementAttribute

      The accessibility object clipped by the matte.

      Available in OS X v10.4 and later.

    • kAXIsApplicationRunningAttribute

      kAXIsApplicationRunningAttribute

      Indicates if the application represented by the Dock icon this accessibility object represents is currently running.

      Available in OS X v10.4 and later.

    • kAXFocusedApplicationAttribute

      kAXFocusedApplicationAttribute

      Indicates the application element that is currently accepting keyboard input. This attribute is supported by the system-wide accessibility object to help an assistive application quickly determine the application that is accepting keyboard input. After the assistive application gets the accessibility object representing this application, it can send a message to the application asking for its focused accessibility object.

      Available in OS X v10.2 and later.

    • kAXInsertionPointLineNumberAttribute

      kAXInsertionPointLineNumberAttribute

      The line number of the insertion point in the text associated with this accessibility object.

      Available in OS X v10.4 and later.

    Discussion

    See the “Roles and Associated Attributes” appendix in Accessibility Overview for more information on which attributes are associated with a specific role.

  • Define the parameterized attributes an accessibility object can have.

    Declaration

    Objective-C

    // Text-suite parameterized attributes #define kAXLineForIndexParameterizedAttribute CFSTR("AXLineForIndex") #define kAXRangeForLineParameterizedAttribute CFSTR("AXRangeForLine") #define kAXStringForRangeParameterizedAttribute CFSTR("AXStringForRange") #define kAXRangeForPositionParameterizedAttribute CFSTR("AXRangeForPosition") #define kAXRangeForIndexParameterizedAttribute CFSTR("AXRangeForIndex") #define kAXBoundsForRangeParameterizedAttribute CFSTR("AXBoundsForRange") #define kAXRTFForRangeParameterizedAttribute CFSTR("AXRTFForRange") #define kAXAttributedStringForRangeParameterizedAttribute CFSTR("AXAttributedStringForRange") #define kAXStyleRangeForIndexParameterizedAttribute CFSTR("AXStyleRangeForIndex") #define kAXInsertionPointLineNumberAttribute CFSTR("AXInsertionPointLineNumber")

    Constants

    • kAXLineForIndexParameterizedAttribute

      kAXLineForIndexParameterizedAttribute

      Given an indexed character, the line number of the text associated with this accessibility object that contains the character.

      Available in OS X v10.3 and later.

    • kAXRangeForLineParameterizedAttribute

      kAXRangeForLineParameterizedAttribute

      Given a line number, the range of characters of the text associated with this accessibility object that contains the line number.

      Available in OS X v10.3 and later.

    • kAXStringForRangeParameterizedAttribute

      kAXStringForRangeParameterizedAttribute

      A substring of the text associated with this accessibility object that is specified by the given character range.

      Available in OS X v10.3 and later.

    • kAXRangeForPositionParameterizedAttribute

      kAXRangeForPositionParameterizedAttribute

      The composed character range in the text associated with this accessibility object that is specified by the given screen coordinates. This parameterized attribute returns the complete range of characters (including surrogate pairs of multi-byte glyphs) at the given screen coordinates.

      Available in OS X v10.3 and later.

    • kAXRangeForIndexParameterizedAttribute

      kAXRangeForIndexParameterizedAttribute

      The composed character range in the text associated with this accessibility object that is specified by the given index value. This parameterized attribute returns the complete range of characters (including surrogate pairs of multi-byte glyphs) at the given index.

      Available in OS X v10.3 and later.

    • kAXBoundsForRangeParameterizedAttribute

      kAXBoundsForRangeParameterizedAttribute

      The bounding rectangle of the text associated with this accessibility object that is specified by the given range. This is the bounding rectangle a sighted user would see on the display screen, in pixels.

      Available in OS X v10.3 and later.

    • kAXRTFForRangeParameterizedAttribute

      kAXRTFForRangeParameterizedAttribute

      The RTF representation of the text associated with this accessibility object that is specified by the given range.

      Available in OS X v10.3 and later.

    • kAXAttributedStringForRangeParameterizedAttribute

      kAXAttributedStringForRangeParameterizedAttribute

      The CFAttributedStringType representation of the text associated with this accessibility object that is specified by the given range.

      Available in OS X v10.4 and later.

    • kAXStyleRangeForIndexParameterizedAttribute

      kAXStyleRangeForIndexParameterizedAttribute

      Given a character index, the range of text associated with this accessibility object over which the style in effect at that character index applies.

      Available in OS X v10.3 and later.

    Discussion

    Parameterized attributes allow you to pass in additional values to get more specific information about the text associated with an accessibility object.

    Availability

    Available in OS X version 10.3 and later.

  • Define the actions an accessibility object can perform.

    Declaration

    Objective-C

    // Accessibility actions. #define kAXPressAction CFSTR(“AXPress”) #define kAXIncrementAction CFSTR(“AXIncrement”) #define kAXDecrementAction CFSTR(“AXDecrement”) #define kAXConfirmAction CFSTR(“AXConfirm”) #define kAXCancelAction CFSTR(“AXCancel”) #define kAXRaiseAction CFSTR(“AXRaise”) #define kAXShowMenuAction CFSTR(“AXShowMenu”)

    Constants

    • kAXPressAction

      kAXPressAction

      Simulates a single click, such as on a button.

      Available in OS X v10.2 and later.

    • kAXIncrementAction

      kAXIncrementAction

      Increments the value of the accessibility object. The amount the value is incremented by is determined by the value of the kAXValueIncrementAttribute attribute.

      Available in OS X v10.2 and later.

    • kAXDecrementAction

      kAXDecrementAction

      Decrements the value of the accessibility object. The amount the value is decremented by is determined by the value of the kAXValueIncrementAttribute attribute.

      Available in OS X v10.2 and later.

    • kAXConfirmAction

      kAXConfirmAction

      Simulates pressing the Return key.

      Available in OS X v10.2 and later.

    • kAXCancelAction

      kAXCancelAction

      Simulates pressing a Cancel button.

      Available in OS X v10.2 and later.

    • kAXRaiseAction

      kAXRaiseAction

      Causes a window to become as frontmost as is allowed by the containing application’s circumstances. Note that an application’s floating windows (such as inspector windows) might remain above a window that performs the raise action.

      Available in OS X v10.3 and later.

    • kAXShowMenuAction

      kAXShowMenuAction

      Simulates the opening of a contextual menu in the element represented by this accessibility object. This action can also be used to simulate the display of a menu that is preassociated with an element, such as the menu that displays when a user clicks Safari’s back button slowly.

      Available in OS X v10.4 and later.

  • Define the notifications that can be broadcast by an accessibility object.

    Declaration

    Objective-C

    // Focus notifications #define kAXMainWindowChangedNotification CFSTR("AXMainWindowChanged") #define kAXFocusedWindowChangedNotification CFSTR("AXFocusedWindowChanged") #define kAXFocusedUIElementChangedNotification CFSTR("AXFocusedUIElementChanged") // Application notifications #define kAXApplicationActivatedNotification CFSTR("AXApplicationActivated") #define kAXApplicationDeactivatedNotification CFSTR("AXApplicationDeactivated") #define kAXApplicationHiddenNotification CFSTR("AXApplicationHidden") #define kAXApplicationShownNotification CFSTR("AXApplicationShown") // Window notifications #define kAXWindowCreatedNotification CFSTR("AXWindowCreated") #define kAXWindowMovedNotification CFSTR("AXWindowMoved") #define kAXWindowResizedNotification CFSTR("AXWindowResized") #define kAXWindowMiniaturizedNotification CFSTR("AXWindowMiniaturized") #define kAXWindowDeminiaturizedNotification CFSTR("AXWindowDeminiaturized") // New drawer, sheet, and help tag notifications #define kAXDrawerCreatedNotification CFSTR("AXDrawerCreated") #define kAXSheetCreatedNotification CFSTR("AXSheetCreated") #define kAXHelpTagCreatedNotification CFSTR("AXHelpTagCreated") // Element notifications #define kAXValueChangedNotification CFSTR("AXValueChanged") #define kAXUIElementDestroyedNotification CFSTR("AXUIElementDestroyed") // Menu notifications #define kAXMenuOpenedNotification CFSTR("AXMenuOpened") #define kAXMenuClosedNotification CFSTR("AXMenuClosed") #define kAXMenuItemSelectedNotification CFSTR("AXMenuItemSelected") // Table and outline view notifications #define kAXRowCountChangedNotification CFSTR("AXRowCountChanged") // Miscellaneous notifications #define kAXSelectedChildrenChangedNotification CFSTR("AXSelectedChildrenChanged") #define kAXResizedNotification CFSTR("AXResized") #define kAXMovedNotification CFSTR("AXMoved") #define kAXCreatedNotification CFSTR("AXCreated”)

    Constants

    • kAXMainWindowChangedNotification

      kAXMainWindowChangedNotification

      The main window has changed.

      Available in OS X v10.2 and later.

    • kAXFocusedWindowChangedNotification

      kAXFocusedWindowChangedNotification

      The focused window has changed.

      Available in OS X v10.2 and later.

    • kAXFocusedUIElementChangedNotification

      kAXFocusedUIElementChangedNotification

      The focused accessibility object has changed.

      Available in OS X v10.2 and later.

    • kAXApplicationActivatedNotification

      kAXApplicationActivatedNotification

      The application was activated (that is, brought to front).

      Available in OS X v10.2 and later.

    • kAXApplicationDeactivatedNotification

      kAXApplicationDeactivatedNotification

      The application was deactivated.

      Available in OS X v10.2 and later.

    • kAXApplicationHiddenNotification

      kAXApplicationHiddenNotification

      The application was hidden.

      Available in OS X v10.2 and later.

    • kAXApplicationShownNotification

      kAXApplicationShownNotification

      The application was shown (that is, a hidden application is now visible).

      Available in OS X v10.2 and later.

    • kAXWindowCreatedNotification

      kAXWindowCreatedNotification

      A window was created. Carbon automatically sends this notification when window is created, as long as the window is implemented using Carbon window mechanisms.

      Available in OS X v10.2 and later.

    • kAXWindowMovedNotification

      kAXWindowMovedNotification

      The window was moved (this notification is sent at the end of the window-move operation, not during it).

      Available in OS X v10.2 and later.

    • kAXWindowResizedNotification

      kAXWindowResizedNotification

      The window was resized (this notification is sent at the end of the window-resize operation, not during it).

      Available in OS X v10.2 and later.

    • kAXWindowMiniaturizedNotification

      kAXWindowMiniaturizedNotification

      The application was minimized (that is, moved into the Dock).

      Available in OS X v10.2 and later.

    • kAXWindowDeminiaturizedNotification

      kAXWindowDeminiaturizedNotification

      The window was moved out of the Dock.

      Available in OS X v10.2 and later.

    • kAXDrawerCreatedNotification

      kAXDrawerCreatedNotification

      A drawer was created (that is, a drawer now extends from this window).

      Available in OS X v10.3 and later.

    • kAXSheetCreatedNotification

      kAXSheetCreatedNotification

      A sheet was created (that is, a modal dialog now extends from this window).

      Available in OS X v10.3 and later.

    • kAXHelpTagCreatedNotification

      kAXHelpTagCreatedNotification

      A help tag is now visible for this accessibility object.

      Available in OS X v10.4 and later.

    • kAXValueChangedNotification

      kAXValueChangedNotification

      The value of an accessibility object’s value attribute was changed.

      Available in OS X v10.2 and later.

    • kAXUIElementDestroyedNotification

      kAXUIElementDestroyedNotification

      An accessibility object was disposed of.

      Available in OS X v10.2 and later.

    • kAXMenuOpenedNotification

      kAXMenuOpenedNotification

      A menu was opened.

      Available in OS X v10.2 and later.

    • kAXMenuClosedNotification

      kAXMenuClosedNotification

      A menu was closed.

      Available in OS X v10.2 and later.

    • kAXMenuItemSelectedNotification

      kAXMenuItemSelectedNotification

      A menu item was selected.

      Available in OS X v10.2 and later.

    • kAXRowCountChangedNotification

      kAXRowCountChangedNotification

      The number of rows in this table was changed.

      Available in OS X v10.4 and later.

    • kAXSelectedChildrenChangedNotification

      kAXSelectedChildrenChangedNotification

      A different subset of this accessibility object’s children were selected.

      Available in OS X v10.4 and later.

    • kAXResizedNotification

      kAXResizedNotification

      The window has changed size.

      Available in OS X v10.4 and later.

    • kAXMovedNotification

      kAXMovedNotification

      The position of this accessibility object was changed.

      Available in OS X v10.4 and later.

    • kAXCreatedNotification

      kAXCreatedNotification

      An accessibility object was created.

      Available in OS X v10.4 and later.

  • Define the values for the orientation and sort-direction attributes of some accessibility objects.

    Declaration

    Objective-C

    // Orientations #define kAXHorizontalOrientationValue CFSTR("AXHorizontalOrientation") #define kAXVerticalOrientationValue CFSTR("AXVerticalOrientation") #define kAXUnknownOrientationValue CFSTR("AXUnknownOrientation") // Sort directions #define kAXAscendingSortDirectionValue CFSTR("AXAscendingSortDirection") #define kAXDescendingSortDirectionValue CFSTR("AXDescendingSortDirection") #define kAXUnknownSortDirectionValue CFSTR("AXUnknownSortDirection")

    Constants

    • kAXHorizontalOrientationValue

      kAXHorizontalOrientationValue

      This object is oriented horizontally.

      Available in OS X v10.2 and later.

    • kAXVerticalOrientationValue

      kAXVerticalOrientationValue

      This object is oriented vertically.

      Available in OS X v10.2 and later.

    • kAXUnknownOrientationValue

      kAXUnknownOrientationValue

      The orientation of this object is unknown.

      Available in OS X v10.4 and later.

    • kAXAscendingSortDirectionValue

      kAXAscendingSortDirectionValue

      This object’s contents are sorted in ascending order.

      Available in OS X v10.4 and later.

    • AXDescendingSortDirection

      AXDescendingSortDirection

      This object’s contents are sorted in descending order.

    • kAXUnknownSortDirectionValue

      kAXUnknownSortDirectionValue

      The sort order of this object is unknown.

      Available in OS X v10.4 and later.

    Discussion

    See kAXOrientationAttribute and kAXSortDirectionAttribute for more information on the attributes for which you can use these values.

Result Codes

The result codes returned by the Carbon accessibility implementation are listed below. Other result codes defined in AXError.h are of use only to assistive applications.

  • The value received in this event is an invalid value for this attribute. This also applies for invalid parameters in parameterized attributes.

    Value

    -25201

    Description

    The value received in this event is an invalid value for this attribute. This also applies for invalid parameters in parameterized attributes.

    Available in OS X v10.2 and later.

  • The accessibility object received in this event is invalid.

    Value

    -25202

    Description

    The accessibility object received in this event is invalid.

    Available in OS X v10.2 and later.

  • The observer for the accessibility object received in this event is invalid.

    Value

    -25203

    Description

    The observer for the accessibility object received in this event is invalid.

    Available in OS X v10.2 and later.

  • A fundamental error has occurred, such as a failure to allocate memory during processing.

    Value

    -25204

    Description

    A fundamental error has occurred, such as a failure to allocate memory during processing.

    Available in OS X v10.2 and later.

  • The referenced attribute is not supported. Alternatively, you can return the eventNotHandledErr error.

    Value

    -25205

    Description

    The referenced attribute is not supported. Alternatively, you can return the eventNotHandledErr error.

    Available in OS X v10.2 and later.

  • The referenced action is not supported. Alternatively, you can return the eventNotHandledErr error.

    Value

    -25206

    Description

    The referenced action is not supported. Alternatively, you can return the eventNotHandledErr error.

    Available in OS X v10.2 and later.

  • Assistive applications are not enabled in System Preferences.

    Value

    -25211

    Description

    Assistive applications are not enabled in System Preferences.

    Available in OS X v10.2 and later.

  • The parameterized attribute is not supported. Alternatively, you can return the eventNotHandledErr error.

    Value

    -25213

    Description

    The parameterized attribute is not supported. Alternatively, you can return the eventNotHandledErr error.

    Available in OS X v10.3 and later.