I’ve been doing some work recently on native iOS app accessibility and have started to see common issues appearing related to accessibility that can be resolved by using a common approach.
It’s important to note that accessibility is enabled by default on all iOS app development and if you don’t do anything crazy then your app should be mostly accessible, but it is still worth checking and keeping an eye out for common mistakes.
I do all my testing on a device using VoiceOver but I won’t detail that here, instead, I will write a separate blog post with some tips on VoiceOver testing.
Here’s some tips on making your iOS app accessible:
Enable form field tabbing
A VoiceOver user moves between elements using gestures, so on a form you should make it easy for a VoiceOver user to move between the fields by making a ‘return’ action on each field that moves to the next field, or submits the form on the last field. Apple goes above and beyond this functionality in its own native apps by putting accessible “Previous”, “Next”, and “Done” elements above the keyboard on forms which are recognized by VoiceOver and make it super easy to navigate and submit a form.
If you embed any HTML content in your native app then you should mark the
UIWebView as an accessible element, but very importantly, don’t mark its parent as accessible, otherwise the
UIWebView won’t be accessible via VoiceOver. Once you’ve done this, VoiceOver reads the content in the same way it does a web page in Safari.
UIPageControl page indicators accessible
When you have multiple horizontal pages in a
UIPageControl, the page indicators are the dots that appear at the bottom of the control that indicate which page you are on as you swipe left/right through the pages. VoiceOver uses the swipe left/right gestures for navigation so a VoiceOver user won’t be able to switch between your pages unless they use the page indicators.
Page indicators aren’t automatically accessible, you must do two things. First set the accessibility trait to
UIAccessibilityTraitAdjustable and then implement a
accessibilityDecrement which changes the pages. This means a VoiceOver user can focus on the element and use slider up/down from the top of the screen to navigate pages.
Ensure appropriate color contrast
This isn’t specific to VoiceOver testing but ensuring your application is accessible to visually impaired or color blind users. An example I have seen recently is a black ‘copy/paste’ popup on a black form.
Making accessible iOS isn’t difficult because Apple has done a lot of work to ensure accessibility is built into the development platform. The key is to build these features in as you go and continually test on a device using VoiceOver enabled.