虚拟乐器 iPhone 应用程序中的 VoiceOver 辅助功能?

发布于 2024-11-05 05:46:42 字数 362 浏览 6 评论 0原文

我收到盲人用户的评论,称我的一些声音和音乐相关应用程序只能在关闭 VoiceOver 的情况下使用。

在 iOS 设备上启用 VoiceOver 辅助功能后,是否可以启用音乐键盘或鼓垫触摸区域,以便在点击键盘键或虚拟鼓组(等)时可以立即播放音乐声音,而不是 VoiceOver 提示?

仅在 UIView 子视图上设置 UIAccessibilityTraitPlaysSound AccessibilityTrait 似乎并不能做到这一点。启用 VoiceOver 后,我会听到 VoiceOver 咔嗒声,而不是钢琴或鼓声。

盲人用户可以完全关闭 VoiceOver,但随后所有其他按钮(乐器选择、配置、帮助等)和/或控件将不再有 VoiceOver 帮助。

I have received comments from blind users that some of my sound and music related apps only work with VoiceOver off.

With VoiceOver Accessibility enabled on an iOS device, is it possible to enable a music keyboard or drum pad touch area so that music sounds can be played immediately, instead of VoiceOver prompts, when a keyboard key or virtual drum set (etc.) is tapped?

Just setting the UIAccessibilityTraitPlaysSound AccessibilityTrait on a UIView subview doesn't seem to do it. I get VoiceOver clicking instead of piano or drum sounds with VoiceOver enabled.

A blind user can turn VoiceOver completely off, but then all the other buttons (Instrument selection, Configuration, Help, etc.) and/or controls will no longer will have VoiceOver assistance.

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

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

发布评论

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

评论(2

疯狂的代价 2024-11-12 05:46:42

我现在可以回答我自己的问题了。

iOS 5 专门针对此需求添加了一个新的 API:

[ mySubView setAccessibilityTraits: UIAccessibilityTraitAllowsDirectInteraction ];

仅针对该 UIView 子视图禁用 VoiceOver,但不影响其他子视图(其他按钮等)。此 API 允许应用程序获得更适合在指定子视图内键入乐器的响应式触摸处理程序,即使启用了 VoiceOver 并为指定 UIView 之外的应用程序 UI 的其他部分提供帮助也是如此。

I can now answer my own question.

iOS 5 has added a new API exactly for this need:

[ mySubView setAccessibilityTraits: UIAccessibilityTraitAllowsDirectInteraction ];

will disable VoiceOver just for that UIView subview, but leave other subviews (other buttons, etc.) unaffected. This API allows an app to get responsive touch handlers more suitable for keying a musical instrument within the specified subview, even with VoiceOver enabled and providing assistance for other portions of the app's UI outside the specified UIView.

单身情人 2024-11-12 05:46:42

我认为您作为开发人员不可能关闭 VoiceOver,并且您已经发现用户使用 Voiceover 拦截手势来演奏乐器是不切实际的。

我认为将其交给用户是可以接受的。通过三次点击主页按钮可以轻松关闭/打开 Voiceover,尽管默认情况下此功能处于关闭状态(用户可以通过设置 > 常规 > 辅助功能 > 三击主页按钮将其打开)。启用该选项后,用户可以在打开 Voiceover 的情况下探索您的界面,然后在准备好制作音乐时将其关闭,并在完成后再次将其重新打开。

考虑到这一点,您只需要确保所有交互式组件(例如,钢琴键、鼓组的部件)都有有意义的标签。

I don't think it's possible for you the developer to turn off VoiceOver, and as you've discovered it's impractical for users to play an instrument with Voiceover intercepting gestures.

I think it's acceptable to leave this in the hands of the user. It's easy to toggle Voiceover off/on by triple-tapping the home button, although this is off by default (users can turn it on via Settings > General > Accessibility > Triple-click Home). With that option engaged, users can explore your interface with Voiceover on, then toggle it off when they're ready to make music, and toggle it back on again when they're finished.

With that in mind you just need to be sure all interactive components (e.g., piano keys, parts of the drum kit) have meaningful labels.

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