如何押注通过 VoiceOver 访问视图?

发布于 2024-12-03 04:08:51 字数 224 浏览 1 评论 0原文

我正在努力让视力受损的用户可以使用我的 iOS 应用程序。在我的应用程序的一个屏幕上,我显示了一张乐谱图像,并带有一个工具栏按钮,可将视图切换为仅显示歌词。最终,我想为视障用户提供盲文版本的乐谱,但目前我只提供歌词的无障碍版本。

在我花时间提供乐谱的良好易访问版本之前,通过 VoiceOver 说“乐谱;点击 VoiceOver 内容的歌词按钮”的专业、适当的方式是什么?您会如何表述,是标签、值、提示还是其他什么?

I'm working on making my iOS app accessible to vision impaired 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冧九 2024-12-10 04:08:51

非常酷的想法,并且让您的应用程序易于访问,值得称赞!

您是否浏览过 UIKit 中的标头以了解可访问性 API 可用的内容?这可能是最好的起点,以及developer.apple.com上的辅助功能编程指南

您可以通过发布通知来让VoiceOver说话:

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

但是,在这种情况下,最好在相关的特定对象上实现辅助功能API 。例如,在切换乐谱的 UI 按钮上,您可以执行以下操作:

- (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";
}

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";
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文