Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessibility Identifier not visible in Accessibility Inspector with iOS Simulator

I wanted to use the Accessibility Inspector to verify all the accessibility identifiers in my app running in the simulator (iOS 9.2).

Accessibility Inspector is able to return multiple accessibility fields but not the identifiers.

Any idea why and how I could see them ?

like image 977
Matthieu Riegler Avatar asked Jan 22 '16 10:01

Matthieu Riegler


People also ask

How do you enable accessibility on Iphone simulator?

To turn on Accessibility Inspector, run your app in iOS Simulator, go to Home > Settings > General > Accessibility and slide the Accessibility Inspector switch to on.

How do you use the Accessibility Inspector in iOS simulator?

First, open it in the Xcode menu by navigating to Xcode ▸ Open Developer Tool ▸ Accessibility Inspector. The target chooser lets you pick which device you'd like to inspect. This could be your MacBook Pro, an iOS device or your simulator. Live previews of accessibility elements let you test right in the simulator.

Can we test accessibility in iOS simulator?

You can use the Accessibility Inspector to simulate VoiceOver interaction with the accessible elements in your app to examine the information they provide.

How do I run an Accessibility Inspector?

Accessing the Accessibility InspectorChoose Accessibility in the Tools > Web Developer menu. Select the Accessibility tab in the Developer Tools toolbox. Right-click in the main browser window, and choose Inspect Accessibility Properties in the context menu.


1 Answers

There is actually a way, and Chris Prince missed out on explaining how to get to it. You start off by bringing up the inspector.

Showing the top bar

The bar above basically focuses the inspector to whatever process you need to inspect. In our case it should be simulator.
Edit: as pointed out by Dallas, you have to click on the left half revealing the possible targets. Click on the Simulator to have the Inspector target it.

Showing Simulator focus

Something to note that it seems that simulators have their own information to show. Focusing on the simulator will automatically add in the identifier and show the proper accessibility information.

Showing the identifier appearing

voila!

like image 181
Saleh Avatar answered Nov 15 '22 19:11

Saleh