iOS的辅助功能,VoiceOver读取订单问题 [英] Accessibility for iOS, VoiceOver read order issue

查看:358
本文介绍了iOS的辅助功能,VoiceOver读取订单问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是吗?当双指向下轻拂手势完成时,是否可以更改iPad中辅助功能的VoiceOver功能读取元素的顺序?

Is it possible to change the order in which the VoiceOver feature for accessibility in iPad reads out the elements, when the 'Two-finger Flick Down' gesture is done?

对于附件图像,其中包含3个标签和一个按钮,VoiceOver按以下方式读取元素,

For the attached image, which contains 3 labels and a button, the VoiceOver reads the elements in the following way,

标签1 - >标签2 - >按钮 - >标签3

Label 1 -> Label 2 -> Button -> Label 3

订单可以更改为,

标签1 - >标签2 - >标签3 - >按钮

Label 1 -> Label 2 -> Label 3 -> Button

推荐答案

为您的示例实现此目的的最快方法是将三个标签放在透明的 UIView 子类,用作标签的容器。必须正确设置此子类,以便让VoiceOver知道如何解释它。如果您的部署目标是 iOS6 ,那么您只需回答此子类中的should group accessibility children问题。

The quickest way to achieve this for your example is to place the three labels in a transparent UIView subclass to serve as a container for your labels. This subclass will have to be properly setup to let VoiceOver know how to interpret it. If your deployment target is iOS6 then you can simply answer the "should group accessibility children" question in this subclass.

-(BOOL)shouldGroupAccessibilityChildren{
    return YES;
}

低于 iOS6 它会更复杂,除了你的 UIView 容器子类只包含 UILabels 这些是可访问性元素。您可以这样实现:

For below iOS6 it would be more complicated, except that your UIView container subclass would contain only UILabels which are accessibility elements. You could implement it like this:

-(BOOL)isAccessibilityElement{
    return NO;
}
-(NSInteger)accessibilityElementCount{
    return self.subviews.count;
}
-(id)accessibilityElementAtIndex:(NSInteger)index{
    return [self.subviews objectAtIndex:index];
}
-(NSInteger)indexOfAccessibilityElement:(id)element{
    return [self.subviews indexOfObject:element];
}

我测试了这个示例代码,它可以满足您的需求,如果您需要任何澄清请添加评论。总是很乐意帮助让事情更容易获得。

I have tested this example code and it does what you are looking for, if you need any clarification please add a comment. Always happy to help make things more accessible.

这篇关于iOS的辅助功能,VoiceOver读取订单问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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