Accessibility Notifications

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