Please, don't use accessibility labels as ids for your UI tests. It can completely ruin the experience for VoiceOver users. There is actually an accessibility identifier property that you can use instead to uniquely identify your UI elements.

You may also find interesting...

Custom actions work as great on Switch Control as they do in VoiceOver. It makes navigation much, much, faster and you’ll be able to find all those custom actions in the Switch Control menu.
An interesting speech attribute for attributed accessibility labels is accessibilitySpeechIPANotation that lets you specify how VoiceOver should pronounce a label with the International Phonetic Alphabet (IPA) notation. https://developer.apple.com/documentation/foundation/nsattributedstring/key/accessibilityspeechipanotation

With accessibilityRepresentation(representation:), you can create a custom component and it can be perceived by assistive technologies as the view you pass as representation. No need to manually configure accessibility attributes. It is one of the most interesting additions to SwiftUI to help you develop accessible UI components. If your custom component behaves similarly to a native one, this is the way to go. https://developer.apple.com/documentation/swiftui/view/accessibilityrepresentation(representation:)