By its name, I misunderstood what shouldGroupAccessibilityChildren does the first time I saw it. It can be used for VoiceOver to traverse all items in a view before moving to the next one, instead of grouping as in combining those elements.

Apple remote control app from control centre. In one example VoiceOver traverses the elements from left to right and top to bottom. The order is: Menu, back, volume up, play/pause, volume down. The button for changing the volume are far apart. We could set the property shouldGroupAccessibilityChildren to true for the container views containing the menu and play buttons and the volume up and down buttons. If we do that, the order would be: menu, play/pause, back, volume up, and volume down. It seems much more logical this way.

VoiceOver traverses elements in the natural reading order, from left to right, top to bottom, in left-to-right languages. Sometimes data is displayed in columns, so that order might not be the most logical one.

https://developer.apple.com/documentation/objectivec/nsobject-swift.class/shouldgroupaccessibilitychildren

You may also find interesting...

accessibilitySpeechPitch lets you emphasise something changing VoiceOver's pitch. The value goes from 0.0 to 2.0. The default is 1.0. Twitter could change pitch to read hashtags, for example, avoiding repetition but still signalling they're there.

Since iOS 14, you can get a human readable localised name for a UIColor, with a very useful property called accessibilityName, that you can use in accessibility attributes like labels or values. How cool is that? https://developer.apple.com/documentation/uikit/uicolor/accessibilityname

All the accessibility capabilities you can check for, have counterpart notification names you can observe in case the user changes its preferences while using your app. https://x.com/dadederk/status/1577435144129892352

Created in Swift with Ignite.

Supporting Swift for Swifts