This example gives a detailed description of how a fictitious screen reader with speech recognition and speech synthesis capability might communicate with your application:
The user says, “Open Preferences window.”
The screen reader sends a message to the application accessibility object, asking for its menu bar attribute, which is a reference to the menu bar accessibility object. It then queries the menu bar for a list of its children, and queries each child for its title attribute until it finds the one whose title is the application’s name (that is, the application menu). A second iteration lets it find the Preferences menu item within the application menu. Finally, the screen reader tells the Preferences menu item to perform the press action.
The application opens the Preferences window and then the window sends a notification broadcasting that a new window is now visible and active.
The screen reader, assuming that it registered to be notified when a new window opens, queries the window for a list of its attributes. Assuming that the window accessibility object contains a children attribute, it then queries the accessibility object for the value of its children attribute.
To each child of the window accessibility object, the screen reader sends a query asking for a list of its attributes. It then queries the child for the values of its role, role description, and (if it exists) children attributes.
Among the responses, the screen reader learns that the pane contains several children (for example, three checkboxes).
The screen reader queries each checkbox, asking for the values of the following attributes:
role (checkBox in this case)
role description (“checkbox”)
value (checked or unchecked)
children (none in this case)
The screen reader, having learned what objects (controls in this case) are accessible in the window, reports this information to the user using speech synthesis.
The user might then ask for more information about one of the checkboxes.
The screen reader queries the specified checkbox, asking for the value of its help attribute (assuming it exists). It reports this string to the user using speech synthesis.
The user then tells the screen reader to check the checkbox.
The screen reader sends a message requesting that the checkbox’s value attribute be set to 1.
The checkbox accessibility object broadcasts that the value of its value attribute has changed.
Last updated: 2007-12-11