简体   繁体   English

具有自定义 inputView (VoiceOver) 的 UITextField 可访问性

[英]Accessibility for UITextField with custom inputView (VoiceOver)

I have an UITextField that uses a UIPickerView with two columns as inputView .我有一个UITextField ,它使用带有两列的UIPickerView作为inputView

当用户点击目标范围单元格时,底部的选择器出现

Image: When the user taps on the Target Range cell, the picker at the bottom appears.图像:当用户点击目标范围单元格时,底部的选择器会出现。

I'm wondering how to optimise the VoiceOver experience for this setup.我想知道如何优化此设置的 VoiceOver 体验。

  1. When tapping the text field VoiceOver says "[...] Insertion Point at end" This is misleading to the user, because he doesn't need to care about the caret.当点击文本字段时,VoiceOver 会说“[...] 插入点在结尾”这会误导用户,因为他不需要关心插入符号。 How can I fix that?我该如何解决?
  2. I'm not sure: Should the focus change to the picker view automatically after the double tapping the text field?我不确定:双击文本字段后,焦点是否应该自动更改为选择器视图?
  3. How to communicate to the user that there are two components in the UIPickerView and that the left one represents the lower target range and the right one represents the upper target range? UIPickerView有两个组件,左边一个代表下目标范围,右边一个代表上目标范围,如何向用户传达?

Thanks in advance.提前致谢。

1) Use the STATIC TEXT TRAIT on the input field. 1) 在输入字段上使用 STATIC TEXT TRAIT。

2) Yes 2) 是的

3) I'd separate the two values. 3)我将两个值分开。 Have a picker for each, instead of this advanced picker with both.每个都有一个选择器,而不是两个都有的高级选择器。

If this isn't possible, you'll want to add that information in. That information might make a good accessibilityHint.如果这是不可能的,您将需要添加该信息。该信息可能是一个很好的可访问性提示。 It's something that users that frequent your app will become accustomed to, so it's not crucial information.这是经常使用您的应用程序的用户会习惯的东西,因此它不是关键信息。 But, new users might need reminded.但是,新用户可能需要提醒。

Note: users can turn off hints, so if you feel that information is critical, it would be better to bundle it in with the accessibilityLabel.注意:用户可以关闭提示,因此如果您觉得信息很重要,最好将其与accessibilityLabel 捆绑在一起。

对于第 1 点,只需将“nil”值分配给 textfieldName.text

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

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