开发者

How to punt on making a view accessible via VoiceOver?

I'm working on making my iOS app accessible to vision im开发者_高级运维paired users. On one screen of my app I'm showing an image of sheet music, with a toolbar button which toggles the view to just show the lyrics. Eventually I would like to provide a braille version of the sheet music to visually impaired users, but for now I'm only providing an accessible version of the lyrics.

Until I can take the time to provide a good accessible version of the sheet music, what would be a professional, appropriate way to say via VoiceOver, "Sheet music; tap the lyrics button for VoiceOver content"? How would you word it, and would it be the label, the value, the hint, or something else?


very cool idea, and kudos on making your apps accessible!

Have you looked through the headers in UIKit to see what is available for the accessibility API? this probably the best place to start, as well as the accessibility programming guide on developer.apple.com

You can make VoiceOver speak by posting notifications:

UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, @"tap lyrics button to toggle...");

However, in this case it could be better to implement the accessibility API on the specific objects in question. For example, on the UI button that toggles your sheet music, you could do something like:

- (BOOL)isAccessibilityElement
{
    return YES;
}

- (UIAccessibilityTraits)accessibilityTraits
{
    return [super accessibilityTraits] | UIAccessibilityTraitButton;
}


- (NSString *)accessibilityLabel
{
    return @"Toggle sheet music";
}


- (NSString *)accessibilityHint
{
    return @"Double tap to toggle sheet music";
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜