VoiceOver:强制在屏幕过渡后选择辅助功能元素 [英] VoiceOver: force an accessibility element to be selected after a screen transition

查看:213
本文介绍了VoiceOver:强制在屏幕过渡后选择辅助功能元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使我的iOS应用程式可存取,我即将完成。我的应用程序包含几个自定义屏幕过渡,当VoiceOver打开时,似乎选择在转换后描述的最左上角的元素,或偶尔,一个随机元素。 UIAccessibilityTraitSummaryElement 看起来很有前途,但据我所知,只有当应用程序启动时,而不是任意转换后。

I'm in the process of making my iOS app accessible and I'm nearly finished. My app contains several custom screen transitions, and when VoiceOver is on it seems to pick either the top-leftmost element to describe after the transition or, occasionally, a random element. UIAccessibilityTraitSummaryElement looked promising but as I understand it only works when the app is started, not after arbitrary transitions.

似乎不是一个辅助功能trait或属性来指定给予VoiceOver焦点的元素的首选顺序。有什么办法强制VoiceOver焦点吗?

There doesn't seem to be an accessibility trait or property to specify the preferred order that elements are given VoiceOver focus. Is there any way to force VoiceOver focus?

推荐答案

编辑: iOS 6现在可用,如kevboh所述,发布 UIAccessibilityLayoutChangedNotification UIAccessibilityScreenChangedNotification 时的参数:

iOS 6 is now available, and as mentioned by kevboh, you can now pass an argument when posting a UIAccessibilityLayoutChangedNotification or UIAccessibilityScreenChangedNotification:

UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, myAccessibilityElement);

myAccessibilityElement 将在大多数情况下是UIView其中isAccessibilityElement设置为YES(许多视图的默认值)。

myAccessibilityElement will in most cases be a UIView with isAccessibilityElement set to YES (the default for many views).

或者,您可以添加在iOS6中添加的新trait UIAccessibilityTraitHeader 到您的辅助功能元素 accessibilityTraits ,应该有相同的结果(虽然我没有测试这个)。

Alternatively, you could add the new trait added in iOS6 UIAccessibilityTraitHeader to your accessibility elements' accessibilityTraits, which should have the same result (although I didn't test this yet).

ORIGINAL:在iOS 6中有新的API,这里不能讨论,因为它仍然在NDA下,但可以在WWDC 2012的辅助功能视频中找到

ORIGINAL: There's new API in iOS 6 that can't be discussed here because it is still under NDA, but can be found in the "Accessibility for iOS" video of WWDC 2012 (Session 210).

不过,解决方法可能是手动触发公告以覆盖默认的可访问性标签公告:

Failing that though, a workaround could be to manually trigger a announcement to override the default focused accessibility label announcement:

UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, @"Your text");

这篇关于VoiceOver:强制在屏幕过渡后选择辅助功能元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆