Re: Custom table cells
Re: Custom table cells
- Subject: Re: Custom table cells
- From: Patti Hoa <email@hidden>
- Date: Wed, 3 Jun 2009 16:13:50 -0700
Simply overriding NSAccessibilityValueAttribute is not enough. VoiceOver generally prefers getting the text content via a combination of using NSAccessibilityVisibleCharacterRange and NSAccessibilityAttributedStringForRange/NSAccessibilityStringForRange. The information returned from those text attributes comes directly from the actual text string of the cell, which I assume still contains only the tweet text. The better alternative is to provide the username via the NSAccessibilityDescriptionAttribute and see if VoiceOver will pick that up. By the way, when VoiceOver interact with the text cell, it will continue to read only the text string portion of the cell. The AXDescription will only be spoken when the VO cursor first land on the cell, but not when you are reading by char/word (interacting with the text cell). This is expected VoiceOver behavior.
Ditto on the tips Mike mentioned earlier. Below is what I expect to see in your code:
- (NSArray *)accessibilityAttributeNames { if(validAXAttributes == nil) { validAXAttributes = [[[super accessibilityAttributeNames] arrayByAddingObject:NSAccessibilityDescriptionAttribute] retain]; } return validAXAttributes; }
- (id)accessibilityAttributeValue:(NSString *)attribute { if([attribute isEqualToString: arrayByAddingObject:NSAccessibilityDescriptionAttribute]) //AXDescription return <tweet user displayName>;
if([attribute isEqualToString:NSAccessibilityHelpAttribute]) //AXHelp return @"Timeline Tweet"; return [super accessibilityAttributeValue:attribute]; }
Patti
|
_______________________________________________
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