accessibilityIdentifier vs accessibilityLabel: what's the difference?
Essence
Both properties live in the accessibility API, but they serve different audiences.
accessibilityLabel— for the user. VoiceOver reads it and Voice Control works with it ("Tap Share"). It must be localized, short and understandable to a person.accessibilityIdentifier— for code and tests. The user never hears it. A stable string independent of language and on-screen text:"login.submit","cart.item.42".
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep