Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

Carbon Accessibility Reference

Framework
ApplicationServices/HIServices.h, Carbon/HIToolbox.h
Declared in
AXActionConstants.h
AXAttributeConstants.h
AXNotificationConstants.h
AXRoleConstants.h
AXValueConstants.h
CarbonEvents.h
HIAccessibility.h

Overview

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 Mac 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

This section describes the functions some Carbon developers may need to use to access-enable their applications.

AXNotificationHIObjectNotify

Posts a notification for an accessibility object.

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.

Availability
Declared In
HIAccessibility.h

AXUIElementCreateWithHIObjectAndIdentifier

Creates an accessibility object that represents a user interface element.

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 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.

Availability
Declared In
HIAccessibility.h

AXUIElementGetHIObject

Gets the user interface element the given accessibility object represents.

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).

Availability
Declared In
HIAccessibility.h

AXUIElementGetIdentifier

Gets the unique identifier associated with an accessibility object.

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.

Availability
Declared In
HIAccessibility.h

HICopyAccessibilityActionDescription

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

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.

Availability
Declared In
HIAccessibility.h

HICopyAccessibilityRoleDescription

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

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.

Availability
Declared In
HIAccessibility.h

HIObjectIsAccessibilityIgnored

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

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.

Availability
Declared In
HIAccessibility.h

HIObjectOverrideAccessibilityContainment

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

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.

Availability
Declared In
HIAccessibility.h

HIObjectSetAccessibilityIgnored

Marks an HIObject as ignored or unignored for accessibility purposes.

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.

Availability
Declared In
HIAccessibility.h

HIObjectSetAuxiliaryAccessibilityAttribute

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

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.

Availability
Declared In
HIAccessibility.h

Constants

This section describes the constants that define accessibility events and aspects of accessibility objects. The accessibility event constants are defined in CarbonEvents.h in the Carbon framework. The accessibility object constants are defined in header files in the ApplicationServices framework.

Accessibility Events

Accessibility Event Constants

Define accessibility events (kEventClassAccessibility).

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

Constants
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 Mac OS X version 10.2 and later.

Declared in HIAccessibility.h

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 Mac OS X version 10.2 and later.

Declared in HIAccessibility.h

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 Mac OS X version 10.2 and later.

Declared in HIAccessibility.h

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 Mac OS X version 10.3 and later.

Declared in HIAccessibility.h

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 Mac OS X version 10.3.

Available in Mac OS X version 10.2 and later.

Declared in HIAccessibility.h

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 Mac OS X version 10.2 and later.

Declared in HIAccessibility.h

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 Mac OS X version 10.2 and later.

Declared in HIAccessibility.h

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 Mac OS X version 10.2 and later.

Declared in HIAccessibility.h

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 Mac 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 Mac 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 Mac OS X version 10.2 and later.

Declared in HIAccessibility.h

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 Mac OS X version 10.2 and later.

Declared in HIAccessibility.h

Discussion

Table 1 shows the parameters related to accessibility events.

Table 1  Parameter 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 Mac 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 Mac OS X version 10.3 and later)

typeBoolean

kEventAccessibleGetNamedActionDescription

kEventParamAccessibleObject

typeCFTypeRef (an AXUIElementRef)

kEventParamAccessibleActionName

typeCFStringRef

kEventParamAccessibleActionDescription

typeCFMutableStringRef

Accessibility Event Parameters

Define parameters related to accessibility events.

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

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

Available in Mac OS X v10.2 and later.

Declared in CarbonEvents.h

kEventParamAccessibleChild

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

Available in Mac OS X v10.2 and later.

Declared in CarbonEvents.h

kEventParamAccessibleAttributeName

Specifies an attribute name. The parameter type is typeCFStringRef.

Available in Mac OS X v10.2 and later.

Declared in CarbonEvents.h

kEventParamAccessibleAttributeNames

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

Available in Mac OS X v10.2 and later.

Declared in CarbonEvents.h

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 Mac OS X v10.2 and later.

Declared in CarbonEvents.h

kEventParamAccessibleAttributeSettable

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

Available in Mac OS X v10.2 and later.

Declared in CarbonEvents.h

kEventParamAccessibleAttributeParameter

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

Available in Mac OS X v10.3 and later.

Declared in CarbonEvents.h

kEventParamAccessibleActionName

Specifies an action name. The parameter type is typeCFStringRef.

Available in Mac OS X v10.2 and later.

Declared in CarbonEvents.h

kEventParamAccessibleActionNames

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

Available in Mac OS X v10.2 and later.

Declared in CarbonEvents.h

kEventParamAccessibleActionDescription

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

Available in Mac OS X v10.2 and later.

Declared in CarbonEvents.h

kEventParamAccessibleEventQueued

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

Accessibility Event Class

Defines the event class for accessibility events.

enum
{
   kEventClassAccessibility = 'acce',
};

Constants
kEventClassAccessibility

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

Available in Mac OS X v10.2 and later.

Declared in CarbonEvents.h

Accessibility Object Constants

Roles

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

#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

An application.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXSystemWideRole

The system-wide accessibility object.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXWindowRole

A window.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXSheetRole

A sheet.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXDrawerRole

A drawer.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXGrowAreaRole

A grow control.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXImageRole

An image.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXUnknownRole

Generic role value for an unknown accessibility object.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXButtonRole

A button.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXRadioButtonRole

A radio button.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXCheckBoxRole

A check box.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXPopUpButtonRole

A pop-up button.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXMenuButtonRole

A menu button.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXTabGroupRole

A tab view.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXTableRole

A table.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXColumnRole

A column.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXRowRole

A row.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXOutlineRole

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

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXBrowserRole

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

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXScrollAreaRole

An accessibility object that displays data managed by scrolling controls.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXScrollBarRole

A scroll bar control.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXRadioGroupRole

A set of radio buttons.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXListRole

A list view.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXGroupRole

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

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXValueIndicatorRole

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

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXComboBoxRole

A combo box control.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXSliderRole

A slider control.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXIncrementorRole

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

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXBusyIndicatorRole

An asynchronous progress indicator.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXProgressIndicatorRole

A determinate or indeterminate progress indicator.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXRelevanceIndicatorRole

A relevance indicator.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXToolbarRole

A toolbar.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXDisclosureTriangleRole

A disclosure triangle control.

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

kAXTextFieldRole

A text field.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXTextAreaRole

The editable text area in a control or window.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXStaticTextRole

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

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXMenuBarRole

A menu bar.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXMenuBarItemRole

A menu bar item.

Available in Mac OS X v10.3 and later.

Declared in AXRoleConstants.h

kAXMenuRole

A menu.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXMenuItemRole

A menu item.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXSplitGroupRole

A split view.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXSplitterRole

A splitter bar control.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXColorWellRole

A color well.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXTimeFieldRole

A field that displays time.

Available in Mac OS X v10.3 and later.

Declared in AXRoleConstants.h

kAXDateFieldRole

A field that displays dates.

Available in Mac OS X v10.3 and later.

Declared in AXRoleConstants.h

kAXHelpTagRole

A help tag.

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

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 Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

kAXDockItemRole

An icon that represents an item in the Dock.

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

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.

Subroles

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

#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

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

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXMinimizeButtonSubrole

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

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXZoomButtonSubrole

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

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXToolbarButtonSubrole

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

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXSecureTextFieldSubrole

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

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXTableRowSubrole

A row in a table.

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXOutlineRowSubrole

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

Available in Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

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 Mac OS X v10.2 and later.

Declared in AXRoleConstants.h

kAXStandardWindowSubrole

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

Available in Mac OS X v10.3 and later.

Declared in AXRoleConstants.h

kAXDialogSubrole

A dialog window, such as an alert.

Available in Mac OS X v10.3 and later.

Declared in AXRoleConstants.h

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 Mac OS X v10.3 and later.

Declared in AXRoleConstants.h

kAXFloatingWindowSubrole

A utility window.

Available in Mac OS X v10.3 and later.

Declared in AXRoleConstants.h

kAXSystemFloatingWindowSubrole

A system-generated utility window.

Available in Mac OS X v10.3 and later.

Declared in AXRoleConstants.h

kAXIncrementArrowSubrole

The up arrow of a scroll bar.

Available in Mac OS X v10.3 and later.

Declared in AXRoleConstants.h

kAXDecrementArrowSubrole

The down arrow of a scroll bar.

Available in Mac OS X v10.3 and later.

Declared in AXRoleConstants.h

kAXIncrementPageSubrole

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

Available in Mac OS X v10.3 and later.

Declared in AXRoleConstants.h

kAXDecrementPageSubrole

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

Available in Mac OS X v10.3 and later.

Declared in AXRoleConstants.h

kAXSortButtonSubrole

A column heading button in a list or column view.

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

kAXSearchFieldSubrole

A search field.

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

kAXApplicationDockItemSubrole

An icon in the Dock that represents an application.

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

kAXDocumentDockItemSubrole

An icon in the Dock that represents a document.

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

kAXFolderDockItemSubrole

An icon in the Dock that represents a folder.

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

kAXMinimizedWindowDockItemSubrole

An icon in the Dock that represents a minimized window.

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

kAXURLDockItemSubrole

An icon in the Dock that represents a URL.

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

kAXDockExtraDockItemSubrole

An icon in the Dock that represents a Dock Extra.

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

kAXTrashDockItemSubrole

The icon in the Dock that represents the Trash.

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

kAXProcessSwitcherListSubrole

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

Available in Mac OS X v10.4 and later.

Declared in AXRoleConstants.h

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.

Attributes

Define the attributes available for accessibility objects.

//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

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

kAXHelpAttribute

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

Available in Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.4 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.4 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X v10.2 and later.

Declared in AXAttributeConstants.h

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 Mac OS X