O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSAccessibility — Mac OS X 10.2

Synopsis

Cocoa provides support for accessibility, which gives Cocoa applications the ability to work with other assistive applications, such as screen readers. This informal protocol declares the methods that classes in an application must implement to interface with the accessibility system. The great majority of Application Kit classes implement this protocol, meaning that Cocoa applications are largely accessible to assistive technologies. However, if you do a great deal of customization to existing Cocoa classes, it may be necessary to implement portions of the protocol yourself.

@interface NSObject (NSAccessibility)
                                  // Instance Methods
   - (NSArray *)accessibilityAttributeNames;
   - (id)accessibilityAttributeValue:(NSString *)attribute;
   - (BOOL)accessibilityIsAttributeSettable:(NSString *)attribute;
   - (void)accessibilitySetValue:(id)value 
                                 forAttribute:(NSString *)attribute;
   - (NSArray *)accessibilityActionNames;
   - (NSString *)accessibilityActionDescription:(NSString *)action;
   - (void)accessibilityPerformAction:(NSString *)action;
   - (BOOL)accessibilityIsIgnored;
   - (id)accessibilityHitTest:(NSPoint)point;
   - (id)accessibilityFocusedUIElement;
@end

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required