This appendix lists many of the roles Mac OS X defines, along with the attributes an object of that role should support. If you must create accessibility objects to represent custom user interface objects in your application, you can use this information to ensure you support the appropriate set of attributes. If you are an assistive application developer, you can use this information to learn what values you can get from objects of different roles.
Because different application frameworks have different ways of implementing the accessibility object, the type of an attribute’s value also differs according to the application framework. For example, a string value in the Carbon accessibility implementation is usually an object of type CFStringRef, whereas in Cocoa, a string is implemented as an NSString. The value types listed in the tables in this appendix are therefore generic, such as string or Boolean. The exception to this is when the value type is an accessibility object. In these cases, in the interests of space, the tables list UIElement instead of Accessibility Object.
The application frameworks also provide different constant names for attributes, roles, actions, and notifications. In Carbon, for example, the radio-button role is defined as the constant kAXRadioButtonRole and the CFString AXRadioButton. In Cocoa, the same role is defined as the constant NSString NSAccessibilityRadioButtonRole. This document, therefore, uses the base of the name, which is common to both frameworks, and displays it as a title. To refer to the radio-button role, for example, this appendix uses the phrase Radio Button. Attribute names are listed in a similar manner.
The application frameworks also differ somewhat in how they define which attributes are required for each role. In general, Cocoa requires all of a role’s required attributes to be present whether or not the value of a particular attribute is NULL in a specific instance of that role. Carbon, on the other hand, sometimes allows a specific instance of a role to leave out a normally required attribute if the value of the attribute would be NULL. Be sure to check the application framework–specific documentation to learn whether you can leave out an attribute whose value is NULL.
Note: All accessibility objects include the Role and Role Description attributes. To conserve space, these attributes are not listed in the role-specific sections below. For more information on these attributes, see “The Role and Role Description Attributes.”
Application Role
Browser Role
Busy Indicator Role
Button Role
Checkbox Role
Color Well Role
Combo Box Role
Disclosure Triangle Role
Dock Item Role
Drawer Role
Group Role
Grow Area Role
Image Role
Incrementor Role
List Role
Menu Role
Menu Bar Item Role
Menu Bar Role
Menu Button Role
Menu Item Role
Outline Role
Pop-Up Button Role
Progress Indicator Role
Radio Button Role
Radio Group Role
Relevance Indicator Role
Row Role
Ruler Role
Ruler Marker Role
Scroll Area Role
Scroll Bar Role
Sheet Role
Slider Role
Split Group Role
Splitter Role
Static Text Role
Tab Group Role
Table Role
Text Area Role
Text Field Role
Toolbar Role
Unknown Role
Value Indicator Role
Window Role
Last updated: 2008-03-11