Role Property

[This is preliminary documentation and subject to change.]

The Role property, retrieved by calling the IAccessible::get_accRole method, describes an object's role. Generally, the Role property describes the object's purpose in terms of its relationship with sibling or child objects. The oleacc.dll dynamic link library supports the role constants defined in the oleacc.h header file. These role constants are symbolic numeric values that identify common object roles. However, servers can provide strings when the standard values do not suffice. Use the GetRoleText method to retrieve these strings.

In many cases, the object's role is obvious; windows have a role of ROLE_SYSTEM_WINDOW and buttons have the ROLE_SYSTEM_PUSHBUTTON role. However, some objects' roles aren't so easy to describe. A folder's large-icon view allows arbitrary arrangement of icons, so its role could be described as ROLE_SYSTEM_GROUPING. Or, a control that provides items in fixed rows and columns could be have the ROLE_SYSTEM_TABLE role.