iOS Accessibility: Getting Started | raywenderlich.com

In this iOS accessibility tutorial, learn how to make apps more accessible using VoiceOver and the Accessibility inspector.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/6827616-ios-accessibility-getting-started

Hi,

I am usually faced with a problem with UI Tests.
Not every screen is using accessibility (unfortunately) in my application and I still want to write the UI-Tests for those screens.
Problem is to access elements in UI Tests, accessibilityIdentifier/ accessibilityLabel is needed.

So Question — How can we access elements whose accessibility is OFF?
Any help will be appreciated.

As I shuffle through the cells of the list view in the Accessibility Inspector, VoiceOver uses the “dishLabel” value automatically to identify the whole cell.
Is that something you achieve by doing anything in the storyboard, or it just picks the first available label text value it finds in the cell’s contentView subviews hierarchy?

@k28gupta Thanks very much for your question, and my apologies for the delayed response.

From what I know, unfortunately your UI elements must have an accessibilityLabel and/or an accessibilityIdentifier, with the “isAccessibilityElement” property set to “true”. :frowning:

I really am sorry. I hope this helps.

All the best.

[EDIT] I updated to Xcode 12 Beta 4 and the problem went away! I do not delete the comment and leave it here if somebody got the same issue.

I really want to get better at accessibility for my future apps. I started the tutorial and the first thing I get when compiling is “ERROR: Each TDDistiller instance can be distilled only one time!”.
Kinda of cryptic. Stackoverflow did not help much this time. I guess it might be unrelated to this tutorial but I never had this problem before.
If anyone had the same problem pls help. I already tried the usual things, like clearing the build and deleting the derived data folder
 restarting Xcode etc.
I am on Xcode 12 Beta 2, Mac Big Sur but don’t think this has to do with the beta. We’ll see!

Hi @syedfa
Thank you for the tutorial.
I have a question here. It looks like the ‘Invert Colors’ option doesn’t seem to run in the Accessibility Inspector in Xcode-12.4 Mac OS-Bug Sur. In that case how should we test the ‘Invert Colors’ option?
Thank You

I got a message " Failed to register bundle identifier

The app identifier “com.raywenderlich.Recipe” cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again."

That pops up when I try to select a team

Hi @syedfa
Thank you for the amazing tutorial. I have found an issue after Making the Text Dynamic for the dishNameLabel. If I zoom the text to the maximum level, the text starts behaving weird. I have attached the screenshot.
Simulator Screen Shot - iPhone 11 - 2022-10-12 at 18.55.23