One can implement sectionIndexTitlesForTableView
to add icons along the right of the table view that allows the user to jump to specific sections in the table. When you interact with this section index using VoiceOver, it announces each section index character each time you swipe to jump to a section. My question is, how can you configure what VoiceOver announces for each section index - can you set the accessibilityLabel
for each index?
You set accessibilityLabel
directly on the NSString
you are returning from sectionIndexTitlesForTableView:
. I.e.:
- (NSArray *)sectionIndexTitlesForTableView:(id)tableView {
NSString *one = "1";
one.accessibilityLabel = @"First";
...
return @[one, ...];
}
This was discussed in "Accessibility for iOS" session in WWDC 2012 as an advanced trick (feels rather like an Easter Egg to me ;-), see the slides, pages 128-130.
P.S.: You may read the whole "Things you might not know" section there for other interesting tricks.