Accessibility in iOS: Start Off
Accessibility in iOS: Start Off

Accessibility in iOS: Start Off

Pramod Kumar
AppleCommunity

--

Accessibility is the practice of making products, devices, services, or environments as to be usable by many people as possible. We can think it as ,“ability to access”.
We can also consider accessibility as treating every user the same and providing them equal opportunities, no matter what their situations and abilities are. Whilst it is inaccurate to exclude peoples with disabilities.

📣 Accessibility is all about making applications available for everyone irrespective of their abilities with visual, auditory, or other cognitive impairments.

Accessibility is enough to take discussion ahead. Therefor we will discuss accessibility in two sessions 😃:
1. Start Off: We will discuss myths, facts, tools & technologies, quality assurance tools, professional guidelines or law and APIs.
2. Hands On Code: We will implement accessibility with the help of example.
Now, we are pretty much clear about what accessibility means.
Let’s start.

Myths about accessibility

Some of the common myths 😕 from application developer or owner, are critical barriers preventing applications form being more accessible for every one.

👉 Implementing accessibility in mobile applications requires highly complicated skills.
👉 Accessibility will not make ample effect on the reach of the mobile app.
👉 Making mobile applications more accessible will amplify the mobile application development process unreasonably.
👉 Implementation of accessibility in mobile applications will make them unattractive and look dull.
👉 Accessibility is for blind people only.

All these myths can be resolved by educating designers and developers about implementing accessibility process 😀. As a matter of fact, accessibility would make applications look more professional and world class.
Let’s go towards some interesting facts about accessibility to overcome these myths.

Interesting Facts

Thursday, May 21 2020 marks the ninth Global Accessibility Awareness Day (GAAD). To get every one thinking, talking and learning about people with different disabilities and digital access/inclusion.
I got some interesting facts 😉 here for us about accessibility.

👉 Popular smartphones come with robust screen readers built in — Apple features VoiceOver and Android features TalkBack.
👉 Less than 5% of the total apps on Play Store and App Store support accessibility in the right manner 😮.
👉 Colour shouldn’t be the only visual means of conveying information because not everyone will detect colour (or detect colour in the same way).
👉 An estimated 4.5% of mobile users have deficiencies in colour perception.
👉 According to WHO estimated 15–20% of mobile users across the world are differently abled 😯.

Now, as we already know that about one people out of five peoples have some type of impairment. It feels good to know you’re making a small but noticeable difference in someone’s life! 😎
So, it’s very crucial to keep them in mind while developing applications.

Developer Tools

Apple provides some very helpful tools to assist developers with implementing accessibility into the applications. Let’s have a look on these tools 🛠.

➤ VoiceOver:
iOS comes with screen-reading tool VoiceOver, that helps users to interact with application even without seeing screen. VoiceOver reacts to gestures and audibly communicates with the user what’s on the screen or what the user focuses. In gist, VoiceOver is the link between user’s touch input and application’s UI.
Turn on the VoiceOver, open settings app of iOS device → select “Accessibility” → select “Accessibility Shortcut” → now choose “VoiceOver”

Accessibility Shortcut in Settings App
Accessibility Shortcut in Settings App

If noticed this screen saying “Configure and then triple-click the side button to toggle accessibility feature on or off”.
For older device those have home button, home button used for toggle feature on or off.

Note: Accessibility shortcut have many other features including AssistiveTouch, Classic Invert Colours and listed on the screen as well.

VoiceOver comes with some handy gestures, those enable users to easily navigate application. Here are some commonly used gestures.
Single-tap anywhere on the screen and VoiceOver will read identifying information from the item’s accessibility attributes out loud.
Single-swipe down to spell the focused item letter-by-letter.
Single-swipe left or right and VoiceOver will select the next visible accessibility item and read it out loud. Right-swipes move forward and down, while left-swipes do the opposite.
Double-tap to select the focused item.
Three-finger-swipe left or right to navigate forward or backward in a page view.

Apple have documented all the VoiceOver gestures in Learn VoiceOver gestures on iPhone.

➤ VoiceOver Rotor:
VoiceOver Rotor can be best described as a wheel of commands dependent on context, that in force with only one command at any one time. Active command changes as you spin the wheel.

Rotor on screen
Rotor on screen

For using rotor, VoiceOver must be turned on, then you can place two finger anywhere on screen and rotate one finger while another finger would be stable at place.
Apple have professional documentation for all gestures about the VoiceOver rotor on iPhone

➤ Accessibility Inspector:
During the development of accessibility, might be frustrating to test every time on device. For making this easy and test accessibility on simulators Apple provides Accessibility Inspector. Even you can test accessibility on simulator without accessing VoiceOver.
To open accessibility inspector you can go in Xcode, select Xcode → Open Developer Tool → Accessibility Inspector.

Steps to Open Accessibility Inspector
Steps to Open Accessibility Inspector

After selecting, Accessibility Inspector window should popup, will look similar like:

Accessibility Inspector

Target Selector: presents all the available devices and let you select the device on which you like to inspect.
Inspection Pointer: When you click on inspection pointer it got selected and you can choose any element on selected device on target selector, element got highlighted with green colour.
It is similar to focusing any element using VoiceOver.
Inspection Details: shows all the required information to review about selected element in inspection pointer.
Basic: shows all the accessibility properties for highlighted element.
Actions
: shows all the available actions for highlighted element and let you perform by clicking on “Perform” button.
Element: shows class, address and controller on current highlighted element.
Hierarchy: shows the view hierarchy of current element.
Audit Details: There is a button “Run Audit”, as you click on this button it will scan the whole screen being shown in selected device on target selector.
It will show several warnings including that some of element has no description. When you click any warning related element will highlights in simulator and at the bottom of accessibility inspector too.
You can choose help icon (question mark in circle) for getting suggested fixes.
You can take screenshot of app by click on eye icon, can be helpful for logging bugs.
Settings: Accessibility Inspector enable us to test some other accessibility features like: Invert colours, Increase contrast, Reduce transparency, Reduce motion and Change font size.
Change font size is mostly used to resize the font of application.

Quality Assurance Tools

According to facts, from a business point, it makes sense for us to ensure the best experience possible while using our apps. We have lots of tools for checking quality of the application. So, let’s discuss some of them…

WorldSpace Attest:
WorldSpace Attest by Deque Systems Inc, is based on imposing rules libraries, that runs on local development server in the same environment as functional or unit tests. It’s very fast, easily customisable and integrates with all major testing frameworks. It contains rules for HTML, native Android and native iOS apps.

WorldSpace Assure:
WorldSpace Assure by Deque Systems Inc, is step-by-step manual accessibility testing and reporting tool that will facilitate testers with minimal accessibility knowledge to create precise, comprehensive and consistent accessibility issue reports for developers.

WCAG Accessibility Checklist:
WCAG Accessibility Checklist app for iOS and Android, is a effective accessibility testing and reporting tool, offering a clear To Do list that delivers reminders and checklists to help achieve the three tiers of accessibility compliance by WCAG — Levels A, AA, and AAA.

Colour Contrast Ratio:
Colour Contrast Ratio is used to measure the contrast between two colours in a screenshot or mobile applications. WCAG 2.0 level AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text. WCAG 2.1 requires a contrast ratio of at least 3:1 for graphics and user interface components. There are many tools for measuring colour contrast, mentioning some of them below:
iOS Color Contrast Checker
Color Contrast Checker & Ratio Calculator
WCAG Color contrast checker
Colour Contrast Checker

Whether you are a developer, a QA tester, or a site owner, accessibility testing tools can and should become an inevitable part of your testing toolkit.

Professional guidelines or Law

There are manifold sets and checklists of guidelines available for founding accessibility tests on, which might seem indefeasible at first peep. My suggestion 👱🏻 is to get acquaint yourself with basic areas in which you need to take care, as well as high-level of professional guidelines.

👉 W3C has provided very detailed and large document that includes very precise, technology-atheist criteria for accessibility conformance. These guidelines are called Web Content Accessibility Guidelines (WCAG), and they are not a short read by any means.
👉 Your country may also have published distinct provision governing the need for serving their population to be accessible. For example Rights of Persons with Disabilities Act, 2016 (RPD) in India, Section 508 of the Rehabilitation Act in the US etc.

W3C keeps a list of Web Accessibility Laws & Policies by all countries.

It is a good idea to find out what your laws are about accessibility. If you make no effort to check that your content is accessible, you could be legally liable if people complain.

Accessibility APIs

The screen reader, voice over (iOS), talk back (android) or other assistive technology uses the semantic information exposed via accessibility API to provide an alternative rendering of an application that is meaningful to a user.

Each operating systems have different accessibility APIs available :
Windows: MSAA/IAccessible, UIAExpress, IAccessible2
Mac OS X: NSAccessibility
Linux: AT-SPI
Android: Accessibility framework
iOS: UIAccessibility

You may not heard about accessibility but now you have a brief introduction and help people getting started making great accessible apps and make the world a better place.
So, we are here for iOS accessibility. We will discuss implementation and hands on code for UIAccessibility in next session.

Thank you for reading, please hit the recommend icon if like this collection 😊 . Questions? Leave them in the comment.

--

--