简体   繁体   English

React-Native:如何检测辅助技术和用户偏好

[英]React-Native: how to detect assistive technology and user preferences

We need to detect if a person is using VoiceOver, Switch Control, TalkBack, or Switch Access to display alternate buttons on our swipe-dependent application. 我们需要检测某个人是否正在使用VoiceOver,Switch Control,TalkBack或Switch Access在依赖于滑动的应用程序上显示备用按钮。 Normally we'd look for UIAccessibilityIsVoiceOverRunning , AccessibilityManager , and other hooks to detect the need to display these buttons. 通常,我们会寻找UIAccessibilityIsVoiceOverRunningAccessibilityManager和其他挂钩来检测是否需要显示这些按钮。

We are also respecting the user's preference for bold fonts and simplified animation via hooks like UIAccessibilityIsBoldTextEnabled() . 我们还通过UIAccessibilityIsBoldTextEnabled()等挂钩尊重用户对粗体字体和简化动画的偏爱。

I couldn't find documentation within React that details how we can get this type of information from the device and write the logic for changing the app's interface. 我在React中找不到文档,该文档详细说明了我们如何从设备中获取此类信息并编写更改应用程序界面的逻辑。

我是网络开发人员,因此这可能相关,也可能无关。您是否可以默认使用non-VoiceOver视图,但是如果页面上的单个项目变为焦点或滚动状态而没有至少一个ontouchdown事件 ,那么您现在知道了使用非触摸输入,然后启用替代行为?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM