Actually, it's not necessary to create the category specified by Viktor Krykun. Setting the accessibilityIdentifier is enough -- Apple's docs say (iOS 6.1.3):
Accessibility Label and Identifier Attributes
The identifier attribute allows you to use more descriptive names for
elements. It is optional, but it must be set for the script to perform
either of these two operations:
- Accessing a container view by name while also being able to access its
children.
- Accessing a UILabel view by name to obtain its displayed
text (via its value attribute).
It may also be necessary to explicitly set
uilabel.accessibilityLabel = NSLocalizedString(@"Element description", @"Localized accessibility label for VoiceOver");
uilabel.accessibilityValue = uilabel.text;
In my own code I have one case where it just works, and another one where I have to explicitly set the values. My best guess at the difference is that maybe it's because I entered and then deleted the accessibility label in Interface Builder in one case -- there may end up being a difference between nil and empty string or something. Apple's code is clearly kind of fragile here (SDK 6.1.3, testing on iOS 5.0 simulator).