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 ?
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.
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.
You can use the Accessibility Inspector to simulate VoiceOver interaction with the accessible elements in your app to examine the information they provide.
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.
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.
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.
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.
voila!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With