Day 164

Inspect labels, traits, and actions

29 Oct 2022

With the Accessibility Inspector you can check the value for the most common accessibility attributes for individual elements, do some basic navigation, and even perform actions if the component is adjustable or if it has custom actions.

The accessibility inspector has a button that lets you select individual elements on a simulator or device. It is also possible to navigate element by element (like emulating left/right swipes with VoiceOver), automatically move through all the elements on screen, speak each element (rough VoiceOver emulation)… it is also possible to see what values the most common accessibility attributes have configured (label, value, traits, identifier, hint…). And even perform some actions: Activate, increment/decrement for adjustable components, and custom actions. A list of all the custom actions appear with a perform button next to it.

Some of you have asked me how you can support what I do. This would really help, and would be hugely appreciated:

  • Find these posts useful? Share them at work, on social media, or with anyone that might find them interesting. Let's spread the word!

  • Check out any of my apps or games: Xarra!, RetroRapid!, or Mestre!.

    • A download and a review go a long way. They're free by default. On the App Store, ratings and reviews really help more people discover them.

    • Finding any of them useful? If so, and if you can afford it, purchasing lifetime access to all features or subscribing lets me buy the coffee that keeps me caffeinated. Caffeine keeps me going to maintain the apps, bring in new features that I hope you'll love, and keep writing.

You may also find interesting...

There is an Environment Overrides panel in the toolbar on top of Xcode's Debug Area. It allows you to select some of the most common accessibility options and Dynamic Type sizes, like in the Accessibility Inspector, plus select dark/light mode.

There is a Color Contrast Calculator conveniently built into the Accessibility Inspector. Find it in Window, in the top menu. Select two colors for text and background and check if it passes for all text sizes or just some of the largest ones.

Xcode has a built-in tool to help you develop more accessible apps, the Accessibility Inspector. You can find it in the Developer Tool set in the Xcode menu. It has three main functionalities: inspect, audit and settings.


Content © Daniel Devesa Derksen-Staats on Accessibility up to 11! is licensed under CC BY 4.0. License details