In 2015 number of the Internet users reached 3 billion, the Android is used by more than 1 billion users, more than 200 millions iOS devices are in use. 15 percent of the world's population, experience some form of disability. Let's take a dive into mobile's accessibility and see how enabling of VoiceOver, Switch Control, Invert Colors can easily make our apps available for everyone.
NB! The deck contains animations, which are available only in PowerPoint and not in the SlideShare experience.
2. About me
7,5 years in Mobile development:
Windows Mobile
webOS
Windows Phone 7/8
iOS (native/Xamarin)
Android
Current Position: Android Tech Lead at Microsoft
klogi@microsoft.com / https://no.linkedin.com/in/klogi
3. Why do I care about accessibility?
• Social responsibility – it’s just right
• Reaching out new users
3B of the Internet users in 2015
1.91B of smartphones users in 2015
• 2.56B in 2018
More than 1B of Android users
1B(every 7th!) have some form of disability
• 285M of visually impaired people
• 1 of 20 Americans are deaf or hard of hearing
Getting better app’s ratings
Extra chance to be featured by Apple
• Legal obligations
When we work on making our devices
accessible by the blind, I don't consider
the bloody ROI
Tim Cook
4. What makes app accessible?
Every user interface element with which users can interact is accessible. This
includes elements that merely supply information, such as static text, as well as
controls that perform actions.
All accessible elements supply accurate and helpful information.
5. Mobile accessibility – what does it involve?
VoiceOver/Talkback – spoken feedback to help blind and low-vision users
Switch Control/Switch Access – navigate through onscreen items and perform
actions using a Bluetooth-enabled switch hardware for people with impaired
physical and motor skills
Large text, color inversion
Zoom / Magnification gestures – to zoom in screen’s content
Siri / Google Now
11. Android practices
Do not use small text sizes
Do not use “dp” as a textSize, only “sp”
Use contrast colors for text and background
Carefully use third-party libraries for UI work
Give a meaningful contentDescriptions for ImageViews, Buttons, CheckBox, etc.
12. Android practices
Don’t forget “state_focused” in selector
If element is not essential for TalkBack mark it as not important for accessibility
(API level 16+):
Review & modified, if needed, focus order or disable focusability with layout
attributes: nextFocusDown,.., nextFocusUp, focusable
Go through the checklist before every release:
http://developer.android.com/guide/topics/ui/accessibility/checklist.html
13. Android practices
How to check if Talkback is turned on (API level 14+):
public static boolean isScreenReaderActive(Context context) {
AccessibilityManager accessibilityManager = (
AccessibilityManager) context.getSystemService(Context.
ACCESSIBILITY_SERVICE);
return accessibilityManager.isTouchExplorationEnabled();
}
How to check if View in Talkback’s focus (API level 21+):
View.isAccessibilityFocused();
Read more about accessibility for Android:
http://developer.android.com/guide/topics/ui/accessibility/index.html
14. iOS practices
Use Apple’s build-in apps as an example
Give a meaningful Titles/Labels, Hints for UIImageViews, UIButtons, UISwitches, etc.
Review Traits and use the right ones
It can be done in Interface Builder or in the code-behind
Have hints for page titles in UITabBarController
• Label: Favorites
• Hint: Shows documents you've added to your favorites.
15. iOS practices
Make custom individual Views accessible
Use Accessibility Inspector on iOS Simulator during
development
Read more:
https://developer.apple.com/library/ios/technotes/TestingAcces
sibilityOfiOSApps/TestAccessibilityiniOSSimulatorwithAccessibili
tyInspector/TestAccessibilityiniOSSimulatorwithAccessibilityInsp
ector.html#//apple_ref/doc/uid/TP40012619-CH4-SW1
16. iOS practices
Use UIAccessibilityAction
(BOOL)accessibilityScroll:(UIAccessibilityScrollDirection)direction - scrolls screen content
in an application-specific way
Required UIAccessibilityPageScrolledNotification with the new page status (such as “Page 1 of 2”).
Custom control with is adjustable element has to:
Include the UIAccessibilityTraitAdjustable trait
Implement accessibilityIncrement and accessibilityDecrement methods
18. Common for both platforms practices
Make all people productive
Don’t reinvent the wheel – stick to platform-specific navigation model
No audio-only feedback
VoiceOver/TalkBack texts have to be also localized
Test the app
19. How can I test my Android app?
Enable accessibility on your device:
20. How can I test my Android app?
Test: Directional controls – app must be operable without touchscreen
Test: TalkBack audio promts – UI controls have clear and accurate audio
descriptions
Test: Touchable control size – all actionable controls bigger, than 48x48 dp
Test: In-app gestures work with Talkback enabled
Test: no audio-only feedback
21. How can I test my iOS app?
Again, use Accessibility Inspector
Enable accessibility on your device:
22. How can I test my iOS app?
Test: Directional controls – app must be operable without touchscreen
Test: VoiceOver audio promts – UI controls have clear and accurate audio
descriptions
To avoid cheating – enable Screen Curtain, so you can rely only VoiceOver speaks
Test: Touchable control size – all actionable controls bigger, than 44x44 px
Test: no audio-only feedback
23. Instead of conclusion
Accessibility is not an investment – it’s just adopting right coding-practices
Accessibility does not impact your ability to innovate and create beautiful apps
It’s easy!
Xamarin claims to have full support of accessibility features.