VoiceOver: speaking text for symbol character UITableViewIndexSearch
VoiceOver: speaking text for symbol character UITableViewIndexSearch
- Subject: VoiceOver: speaking text for symbol character UITableViewIndexSearch
- From: Matthias Schmitt <email@hidden>
- Date: Tue, 15 May 2012 15:22:20 +0200
Hello,
I am using the magnifier glass symbol in my section table index to scroll the table to a search field in the table header. I am embedding the UITableViewIndexSearch character symbol like this:
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
{
NSMutableArray *indexList = [NSMutableArray arrayWithCapacity:[myMenu.alphabet count] + 1];
[indexList addObject:UITableViewIndexSearch];
[indexList addObjectsFromArray:myMenu.alphabet];
return indexList;
}
Everything works nearly perfect. The character is displayed and when I am touching it, the table scrolls perfectly to the top. My problem: when I am running with VoiceOver, the character name is not read. I assume it has no name, which could be spoken. So I tried to give the character an accessibilityLabel like this:
// added before 'return indexList'
[[indexList objectAtIndex:0] setIsAccessibilityElement:YES];
[[indexList objectAtIndex:0] setAccessibilityLabel:@"goto search"];
This does not work, so I tried this:
// added before 'return indexList'
NSString *glass = [NSString stringWithFormat:@"%@", UITableViewIndexSearch];
[glass setIsAccessibilityElement:YES];
[glass setAccessibilityLabel:@"goto search"];
[indexList addObject:glass];
[indexList addObjectsFromArray:myMenu.alphabet];
This does not work too. As an experiment I exchanged the first line of my previous try and tried this with another magnifier glass character (which breaks a little the look and feel and should therefore not be used):
NSString *glass = [NSString stringWithFormat:@"%C%C", 0xD83D, 0xDD0D];
This DOES work! So there is something special about the UITableViewIndexSearch character string, which I cannot explain.
Does anybody know how to get this character accessible? Thank you.
Best regards
Matthias Schmitt
magic moving pixel s.a.
23, Avenue Grande-Duchesse Charlotte
L-3441 Dudelange
Luxembourg
Phone: +352 54 75 75 - 0
http://www.mmp.lu
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden