Member-only story

Accessibility in iOS

Mr.Javed Multani
2 min readOct 3, 2020

--

Accessibility in iOS allows users with hearing disabilities and visual impairments to access iOS and your application by supporting various features like VoiceOver, Voice Control, White on Black, Mono Audio, Speech to Text and so on. Providing Accessibility in the iOS app means making the app usable for everyone

Make a View Accessible

Mark your UIView subclass as an accessible element so that it is visible to VoiceOver.

myView.isAccessibilityElement = YES;

Accessibility Frame

The accessibility frame is used by VoiceOver for hit testing touches, drawing the VoiceOver cursor, and calculating where in the focused element to simulate a tap when the user double-taps the screen. Note that the frame is in screen coordinates!

myElement.accessibilityFrame = frameInScreenCoordinates;

If your elements or screen layouts change often, consider overriding -accessibilityFrame to always provide an up- to-date rect. Calculating the screen-relative frame of scroll view subviews can be error-prone and tedious. iOS 10 introduces a new API to make this easier: accessibilityFrameInContainerSpace.

Layout Change

In many cases, content within a single screen will update with new or different content. For example, imagine a form that reveals additional options based on the user’s answer to a previous question. In this case, a “layout change” notification lets you either announce the change or…

--

--

Mr.Javed Multani
Mr.Javed Multani

Written by Mr.Javed Multani

Software Engineer | Certified ScrumMaster® (CSM) | UX Researcher | Youtuber | Tech Writer

No responses yet