Tips for testing your iOS app’s accessibility

Tue, Aug 11, 2020 6-minute read

Note: This article was originally published in Medium

The cycle for creating great accessible apps starts and ends with testing. Sure, it is always better to get feedback from users to create an experience that holds up to their expectations. But that’s not always possible. Till you can do it, I think the way to go is to do your best. Build it as well as you can, then gather all the feedback you can get, apply the suggestions, test, repeat. Therefore, you’ll probably have to start by self-auditing your app to try to find any potential issues or improvements, and after doing any changes, check that your fixes worked as expected. I’m going to focus on manual testing in this article. It is possible to automate some bits, but to get a real sense of the experience you are offering, you have to try it yourself.

I think it is actually a very fun process. It is a great experience to use your app and device in ways you probably wouldn’t in your day-to-day life. It helps you look at it through a different lens that for sure will make you think in the UX of your app from a different perspective and maybe even give you some ideas on how to improve it.

But I know it is also a process that some people may perceive complicated or difficult to approach at the beginning. So I thought I’d share some of my favorite tips when testing for accessibility in the apps I develop.

Shortcuts

The first thing for me is to allow myself to switch to ‘testing mode’ as easy and quick as possible. If it is easy to toggle on/off VoiceOver, Voice Control, Switch Control, or any of the multiple assistive technologies iOS lets you create a shortcut for, you’ll find yourself testing more, and more often. To enable Accessibility Shortcuts in your device go to Settings, Accessibility, scroll to the bottom and tap Accessibility Shortcut. The final step is to select any of the options you’d like to have quick access to.

Example of the Accessibility Shortcuts menu.

From now on, they’ll be just a triple-click away to your home button or to the side button of your device (if you don’t have a home button anymore). I recommend having more than one option because actioning the shortcut will show you a menu with the options you enabled. If you don’t, you risk enabling VoiceOver accidentally in meetings. True story.

Control Center

Triple-clicking buttons is not always convenient, so you can also have quick access to Accessibility Shortcuts in Control Centre. Just go to Customize Controls in Control Centre’s Settings and make sure you add Accessibility Shortcuts to the included controls. I also like to have a Text Size control in Control Centre, and enable Larger Accessibility Sizes, to test my apps for Dynamic Type.

Accessibility Shortcuts menu in Control Centre. Text Size menu in Control Centre.

Screen Curtain

One of my favorite tricks. Do you think you can use your app even with your eyes closed? Yes? Are you sure? Let’s try it out. A triple-tap with three fingers on the screen, when VoiceOver is on, will let you navigate your app with the screen off. You know how your app looks like, so if you are struggling to complete some of the most common flows, it is probably time to go back to Xcode and improve your app’s accessibility.

Accessibility Inspector

It is a bit of an unknown tool for some reason, but it comes pre-installed with Xcode. You can use the Accessibility Inspector for quickly inspecting accessibility properties in your simulator or even for running an audit, which lets you find issues like: small hit areas, contrast ratio issues, non-accessible elements, and more. Go to Xcode’s top menu, Open Developer Tools, Accessibility Inspector. Select the simulator and start inspecting, auditing or modifying system’s settings in your app.

Accessibility Inspector: Inspect mode. Accessibility Inspector: Audit mode.

Environment Overrides

New to Xcode 11. It lets you test several accessibility configurations in the simulator, including: Reduce Transparency, Bold Text, Smart Invert Colors, etc. It is similar to the Settings you can find in the Accessibility Inspector but right there in Xcode, and with even more options like Dark Mode. You’ll find the Environment Overrides in the Debug Area’s toolbar. Next to the Debug Memory Graph button.

Environment Overrides menu in Xcode.

Voice Control

Pro tip. You can use Voice Control to find issues with your accessibility labels. Turn it on, and say: “Show names”. You’ll see the accessibility labels of your actionable elements on screen. Handy!, especially to find mistakes such as buttons that you forgot to add an accessibility label to.

Apple Maps app being used with Voice Control after saying “Show Names”.

Switch Control

You can test Switch Control connecting a Bluetooth keyboard or even using your selfie camera and triggering the switch by moving your head! Go to Settings, Accessibility, Switch Control, Switches. You can configure, for example, a Right Head Movement to Move To Next Item and a Left Head Movement to Select Item.

Color Contrast Calculator

There are plenty of color contrast calculators online, but just as with the Accessibility Inspector, Xcode includes its own one, so look no further. With the Accessibility Inspector open, go to Window, in the top menu, and click Show Color Contrast Calculator. Or option+command+C.

Color Contrast Calculator tool in Xcode.

VoiceOver Caption Panel

It is a great way to visualize what VoiceOver is saying. Not only is it good for testing but it can also be an alternative way to perform remote VoiceOver demos. Sharing VoiceOver’s audio in video calls can be challenging sometimes. But this way you or the people in the call can read the captions instead. To enable them, as usual, go to Settings, Accessibility, and then VoiceOver, and toggle on the Caption Panel option.

Voice Over Caption Panel.

Automation and 3rd Party Frameworks

Ok, I know I said I was going to focus on manual testing this time. But we all love some help so here’s a bonus track. There are a few tools out there that were developed to help us create more accessible apps. They can help us catch early issues like missing accessibility labels, text that doesn’t support Dynamic Type, color contrast issues, small interactive areas, etc. Here are some of these projects that I would have a look to:

It’s a wrap!

Thanks for reading! I really hope this post helps you test your app’s accessibility and create more accessible apps. Did you know these tips? Any you found particularly useful? Do you have any others I didn’t mention? I’d be super interested in knowing more about it. You can find me in Twitter with the handle @dadederk.

Developing Accessible iOS Apps by Daniel Devesa Derksen-Staats

You can find all these tips, and many more in my book, Developing Accessible iOS apps.

Available in: *Amazon: https://amzn.to/2PDr9cs *Appress: https://www.apress.com/gp/book/9781484253076 *Apple Books: https://books.apple.com/gb/book/developing-accessible-ios-apps/id1490937769

  • Or your favorite online bookstore.

And some useful accessibility code examples in my book’s repo: https://github.com/Apress/developing-accessible-iOS-apps