Apple asks us to consider the combine behavior, before using ignore, for .accessibilityElement(children: ). And for good reason, if combine works, and later on you decide to change the UI, the accessibility attributes will be updated for you.

Two instances of the Stock Analyzer app. The first one shows a row with a criteria i.e. Price-to-earnings, and the value for that criteria i.e. 29.13x. The second one is the same but we'v added a rating code represented by a capital letter i.e. C. If we use .accessibilityElement(children: .combine), that code will work even if we update the UI like that. If we use .accessibilityElement() and therefore, we configure an accessibility label manually, we need to remember to update the accessibility label as we update the UI.

You may also find interesting...

What is the difference between isAccessibilityElement and accessibilityElementsHidden? The first one makes the view not accessible, but its subviews can still be accessible. The second one hides the view and all its subviews from assistive tech.

If a table view cell has a disclosure indicator accessory type configured, the button trait gets added automatically. A good reminder that when following Apple's Human Interface Guidelines, things are more accessible out of the box.

Today I want to share something I use a lot. You can convert any article into a “podcast” by enabling Speak Screen in Accessibility Settings, switching to Safari’s Reader Mode and swiping down with two fingers from the top of the screen. I think it is a good example of how if we all knew more about how to use the assistive tech available in iOS, we would find ourselves using more of them, more often, exemplifying quite well that accessibility benefits everyone.

Created in Swift with Ignite.

Supporting Swift for Swifts