0

When using the Switch Control accessibility feature of iOS, you can turn on "Group Items" to improve the scanning speed.

But does anyone know, how the system decides which controls should be grouped together and which should not?

I have tried laying out the controls in many different ways, but still cannot figure out the logic.

Thanks

Viral Savaj
  • 3,379
  • 1
  • 26
  • 39
RichardC
  • 31
  • 1
  • 4

1 Answers1

-1

It looks like this should do it:

https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIAccessibility_Protocol/index.html#//apple_ref/occ/instp/NSObject/shouldGroupAccessibilityChildren

For example, consider an app that shows items in vertical columns. Normally, VoiceOver would navigate through these items in horizontal rows. Setting the value of this property to YES on the parent view of the items in the vertical columns causes VoiceOver to respect the app’s grouping and navigate them correctly.

So, give the grouped items a common superview, and set shouldGroupAccessibilityChildren to true.

  • 2
    Thanks Jacob for the input. I did try out shouldGroupAccessibilityChildren. This will make the app go through all the child elements of the superview first, before moving on to the other items. But it will not "group" all the child elements when "Group Items" is turned on. But I did find a solution. It is by setting the accessibilityNavigationStyle of the superview to Combined. Something like this superview.accessibilityNavigationStyle = UIAccessibilityNavigationStyle.Combined Thanks – RichardC Apr 29 '15 at 05:20
  • 1
    I tried both shouldGroupAccessibilityChildren and accessibilityNavigationStyle without luck. I'm not sure why voice over is NOT reading 2 labels that are inside a UIView at the same time. I even tried to set the accessibilityLabel of the view but that didn't work either. I'll post my findings if I can make it work – C0D3 Jul 26 '18 at 17:19