Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Minimum requirements for a NSAccessibility object?



Håkan,

Can you tell me a little bit more about the object that you are trying to make accessible?  What is it a subclass of?

Since you are implementing the accessibility protocol from scratch, I am guessing that this object is a subelement of a custom view or control, and is not a view or cell itself.

A second question would be where does this object draw itself?  Is it custom drawing within a view or control?  If so, then the parent of this object needs to report it as one of its children, and needs to implement its accessibility hit testing / focus testing methods to call this object's accessibility hit testing / focus testing methods.

If you could provide a little more info about what you are doing, that would be very helpful.

You might also take a look at the following code samples, which show two different methods of making an object accessible from scratch:

http://developer.apple.com/samplecode/ImageMapExample/index.html
http://developer.apple.com/samplecode/Dicey/index.html

Thanks,

James



On Aug 23, 2006, at 6:46 AM, Håkan Waara wrote:

What's the absolutely required methods and attributes that a generic NSAccessibility object must support to show up in Accessibility Verifier and Accessibility Inspector?

Currently they simply do not show my objects (and don't really help me in determining what's missing). I'm supporting the following methods:

// general
- (id)accessibilityHitTest:(NSPoint)point;
- (BOOL)accessibilityIsIgnored;
- (id)accessibilityFocusedUIElement;

// attributes
- (NSArray*)accessibilityAttributeNames;
- (id)accessibilityAttributeValue:(NSString*)attribute;
- (BOOL)accessibilityIsAttributeSettable:(NSString*)attribute;

// actions
- (NSArray*)accessibilityActionNames;
- (NSString*)accessibilityActionDescription:(NSString*)action;
- (void)accessibilityPerformAction:(NSString*)action;

I support no actions, and no settable attributes. Here are the attributes I support:

NSAccessibilityChildrenAttribute
NSAccessibilityParentAttribute
NSAccessibilityRoleAttribute
NSAccessibilitySubroleAttribute
NSAccessibilityRoleDescriptionAttribute
NSAccessibilityFocusedAttribute
NSAccessibilitySizeAttribute
NSAccessibilityPositionAttribute
NSAccessibilityWindowAttribute

AFAICS, I support all that are listed as mandatory in the API reference, and even some more.

I wish NSAccessibility had more stricts requirements. Right now I more or less have to guess what's missing or what's wrong.

Now and then, at the most, I get a NSException about some attribute in the Xcode debugger, but unfortunately it provides no information about what attribute emitted the error.

Any tips, or ideas are most welcome.

Regards,
Håkan Waara _______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

--------------------------------------------------
James Dempsey
AppKit Engineering
Apple



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/accessibility-dev/email@hidden

This email sent to email@hidden

References: 
 >Minimum requirements for a NSAccessibility object? (From: Håkan Waara <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.