I could not add an accessibility label, but found a workaround:
I will replace the ViewItem header with a UILabel that has accessibility.
UILabel *titleLabel = [[UILabel alloc] init]; titleLabel.text = @"myTitle"; [titleLabel setAccessibilityLabel:@"myCustomAccessiblityLabel"]; [titleLabel setFont:[UIFont boldSystemFontOfSize:20.0]]; [titleLabel setBackgroundColor:[UIColor clearColor]]; [titleLabel setTextColor:[UIColor whiteColor]]; [titleLabel sizeToFit]; self.navigationItem.titleView = titleLabel;
I'm not sure why setting the accessibility label does not work, but the above code works for my needs.
Robert Wagstaff
source share