Debug Accessibility in iOS Simulator with the Accessibility Inspector
The Accessibility Inspector displays accessibility information about each accessible element in an app. You can use the Accessibility Inspector to simulate VoiceOver interaction with the accessible elements in your app to examine the information they provide.
The Accessibility Inspector runs in iOS Simulator and lets you see at a glance the accessibility label, value, hint (if applicable), traits, and frame coordinates for each element onscreen. You are also presented with a list of recently dispatched accessibility notifications.
Run your app in iOS Simulator (for more information on how to do this, see iOS Simulator User Guide).
In the simulated device environment, press the Home button to reveal the Home screen.
Open Settings and go to General > Accessibility.
Slide the Accessibility Inspector switch control to On. The Accessibility Inspector remains active until you turn it off, even if you quit and restart iOS Simulator.
When you run your app in iOS Simulator, a single-click simulates a single-tap, and scrolling with the mouse or keyboard simulates flicking or dragging with the finger. But when the Accessibility Inspector is active, a single-click focuses the inspector on an element; it does not simulate a tap on the element. To simulate a tap on an element while the Accessibility Inspector is active, double-click the element. When the Accessibility Inspector focuses on an element, it draws a shaded box around it (similar to the VoiceOver cursor), as shown in Figure 2-1.
To scroll, you must first deactivate the Accessibility Inspector. Then scroll as needed by dragging the mouse, and reactivate the inspector when you’ve reached the location you want in your app. To deactivate or reactivate the Accessibility Inspector, click the close control in the upper-left corner of the panel (the close control looks like a circle with an “X” in it). Clicking this control does not turn off the Accessibility Inspector; to turn it off, go to General > Accessibility > Accessibility Inspector and change the setting to Off.
When the Accessibility Inspector is not active, it appears as it does in Figure 2-2 and does not affect the way you interact with any simulated app features in iOS Simulator.