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.

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.

The Accessibility Inspector can be used with your device. It is actually quite interesting to check what other apps (or iOS) configure, for some of the basic accessibility attributes (label, value, traits, hint...), in their UI components.

"We have one job, and that's to make our apps work. And if you are not implementing accessibility features, you are forgetting about making it work for a lot of people" @NovallSwift Couldn't have said it better! https://x.com/novallswift/status/1328387659744505856