Learnings for Accessibility for iOS Platform

  • 1,233 views
Uploaded on

This presentation provides an overview on what it means to make an app accessible for the iOS platform. It provides guidelines for making your iOS app accessible and includes an overview on the most …

This presentation provides an overview on what it means to make an app accessible for the iOS platform. It provides guidelines for making your iOS app accessible and includes an overview on the most common accessible attributes, traits and how to add Accessibility via interface builder as well as in code. It covers Accessibility Notifications, Voiceover specific API, Accessibility Containers, and some of the best practices for Accessibility.

More in: Technology , Design
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,233
On Slideshare
0
From Embeds
0
Number of Embeds
22

Actions

Shares
Downloads
5
Comments
0
Likes
3

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. people Learnings for Accessibility Tasneem Sayeed June 6, 2013
  • 2. Agenda • Accessibility – What it means for an iOS developer – How do I make my app accessible • Accessibility Attributes & Traits • Adding Accessibility – via Interface Builder – In Code • Accessibility Notifications • VoiceOver specific API • Scrollable Elements • Accessibility Containers • Best Practices for Accessibility • Summary
  • 3. • Making Your App Accessible – The iOS Human Interface Guidelines provide detailed instructions on how to create an intuitive interface that enables users with disabilities to accomplish tasks quickly and efficiently, while maintaining the consistency and ease of learning that characterizes successful iOS apps. – Developers that use standard controls and their subclasses will find that support for accessibility is built-in. Apple’s Accessibility APIs define how iOS apps can make their user interface available to an external assistive app or service. Accessibility in iOS
  • 4. • How it Works – VoiceOver interacts with objects in your app to allow people with disabilities to drive the user interface in an alternative manner. For example, a VoiceOver user relies solely on an alternative set of gestures for control, and on speech synthesis or braille for feedback. – VoiceOver intercepts all the gestures on the screen - Settings => General =>Accessibility=>VoiceOver=>On - One Click or Touch => Focus - Double-Click => Activates - Three Fingers => Replaces one finger swipe - One Finger Swipe => Replaces Tab Key - Triple Click Home => Quick way to turn on/off VoiceOver Accessibility in iOS
  • 5. Accessibility • Accessibility API introduced in iOS 3.0 • An accessibility interface – Allows another process to • Access individual items in the UI • Query for status and description • Perform actions and events • The remote process is an Assistive Technology (i.e. VoiceOver)
  • 6. Accessibility Attributes Common Accessibility Attributes
  • 7. Accessibility Traits • Accessibility Traits – Tell an assistive application how an accessibility element behaves or should be treated. • UIAccessibilityTraits – A mask that contains the OR combination of the accessibility traits that best characterize an accessibility element.
  • 8. Other Accessibility Attributes
  • 9. Adding Accessibility with Interface Builder • Changing Simple Accessibility values – accessibilityLabel – isAccessibilityElement – accessibilityHint – accessibilityTraits
  • 10. Adding Accessibility in Code • If Accessibility values change
  • 11. Accessibility Notifications • Notifications – Tell VoiceOver something has happened • 2 types of Accessibility Notifications – Those which your app can post. • You post accessibility notifications with UIAccessibilityPostNotification and observe with the default notification center. – And those which your app can observe. • The observable accessibility notifications are posted by UIKit when something in the app’s environment changes, such as when an accessibility setting is toggled, or when the layout of a screen changes.
  • 12. Accessibility Notifications • Screen changes: when your UI changes dramatically. – Usually when a user moves into a different part of your app (navigates to a different screen). UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil); • Layout changes: if some part of your UI changes, but the user hasn’t necessarily jumped to an entirely different part of your app. – This notification tells VoiceOver to re-read the current state of all accessible items that are on-screen, and by doing this it figures out what has changed and informs the user of those changes. UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, nil); • Dynamic changes: if a part of your user interface is dealing with some dynamically changing information (state changes, data changes, etc.). This notification tells VoiceOver to read it out to the user. • UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, @”Loading complete.”);
  • 13. VoiceOver-specific API • VoiceOver-specific API – Sometimes it is useful to determine whether or not VoiceOver is running, and to do different things depending on whether it is or not. – A program can, at any time, test to see whether VoiceOver is enabled or not.
  • 14. VoiceOver-specific API • VoiceOver-specific API – Track where focus is
  • 15. Accessibility Actions for Scrollable Elements • Scrollable Elements – Implement this method if a view in the view hierarchy supports a scroll by page action.
  • 16. Accessibility Containers • Used for custom views with multiple containers • Returns Accessibility “sub-elements” – Ex. MonthView: UIView • Creating an Accessibility Sub-element (fake element) – Make a UIAccessibilityElement • Wraps all important data about an object and sends it over to VoiceOver
  • 17. Accessibility Containers • Make the Contents of Custom Container Views Accessible – If your application displays a custom view that contains other elements with which users interact, you need to make the contained elements separately accessible. – Need to make sure that the container view itself is not accessible. The reason is that users interact with the contents of the container, not with the container itself. – Custom container view should implement the UIAccessibilityContainer protocol. • This protocol defines methods that make the contained elements available in an array. – The following container view creates the array of accessible elements only when methods of the UIAccessibilityContainer protocol are called. As a result, if iPhone accessibility is not currently active, the array is not created.
  • 18. Accessibility Containers
  • 19. Accessibility Containers
  • 20. Best Practices for Accessibility • Use short concise labels – Good: “Add city” – Bad: “Add a city to the list of cities” • Don’t include the type information in the label – Good: “Remove City” – Bad: “Remove City button” • Use localized strings for labels and hints – Good: VoiceOver works in over 30 languages – Localize number and localize dates • Use NSNumberFormatter • With custom table view cells – Only need to add accessibilityLabel – If there are multiple strings, concatenate with commas
  • 21. Summary • What is Accessibility? – What it means for an iOS developer – How do I make my apps accessible? • Common Accessibility Attributes & Traits • Adding Accessibility – Interface Builder – In Code • Accessibility Notifications • VoiceOver specific API • Scrollable Elements • Accessibility Containers • Best Practices for Accessibility
  • 22. Resources – Accessibility Programming Guide for iOS http://developer.apple.com/library/ios/#documentation/UserExperience/ Conceptual/iPhoneAccessibility/Introduction/Introduction.html – UIAccessibility Protocol Reference http://developer.application.com for UIAccessibility – VoiceOver User Manual http://support.apple.com/manuals/iPhone/ – The Librarian: Accessibility on iOS: Make an App for Everyone http://yaccessibilityblog.com/wp/librarian-accessibility-ios.html – Mobile Accessiblity (posted on Oct 8, 2012 by Ted) http://www.last-child.com/mobile-accessibility