VoiceOver announces dimmed instead of disabled for buttons

别等时光非礼了梦想. 提交于 2019-12-21 20:00:13

问题


iOS 8.x VoiceOver announces dimmed instead of disabled for buttons that have been disabled. Is there a way to programmatically get VoiceOver to say "disabled" instead of "dimmed"?


回答1:


There are ways to do what you want, but you absolutely should not use them. The announcement "Dimmed" occurs, when the User Interaction Enabled trait is set to NO. This is the way VoiceOver users are use to on screen, focusable, but disabled elements being announced. Forcing your app to behave in another manner is poor accessibility (See WCAG 2.0 Guideline 3.2.3).

Something you can do, if you want it to be truly disabled, is set isAccessibilityElement to NO. Then it won't even be in the VoiceOver focus loop. Then just set it to YES, when you want to enable it. But, if you want to leave it within the focus loop, "Dimmed" is the appropriate announcement for a temporarily disabled UI element.

My vote would be for the first solution, as modifying the isAccessibilityElement dynamically is a form of dynamic content, and may need additional considerations to maintain proper accessibility (See WCAG 2.0 Guideline 3.2.1 and 3.2.2). Unless there are a lot of such buttons, and flicking through them is tedious, in which case implementing the dynamic element considerations is worth it to maintain good VoiceOver usability.



来源:https://stackoverflow.com/questions/29283878/voiceover-announces-dimmed-instead-of-disabled-for-buttons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!