Important: This document describes the old, key-based accessibility API. The use of this API is discouraged. Use the new, method-based API instead. For more information on the new accessibility API, see Accessibility Programming Guide for OS X.
Assistive applications need to be notified when something in the user interface of your application changes, such as a new window appearing or a control changing its value. An assistive application can then query an accessibility object in your application for its new state and present the information to the user.
NSAccessibility defines a number of notifications such as
NSAccessibilityFocusedUIElementChangedNotification. The assistive application can register to receive notifications coming from a particular accessibility object or from any accessibility object in your application.
NSAccessibility notifications require special handling, so they cannot be sent using an NSNotificationCenter like regular notifications. Instead, notifications are sent with the following function:
void NSAccessibilityPostNotification( id element, NSString *notification );
The element argument is the affected accessibility object and notification is the notification name describing the event.
If you implement custom objects, you may need to send the
NSAccessibilityValueChangedNotification; it is not likely you will ever need to send any others.