shim accessibility for testers.
This commit is contained in:
parent
af2425e296
commit
4cc2a1cda0
@ -63,8 +63,13 @@
|
|||||||
|
|
||||||
- (void)amendAccesibilityLabel {
|
- (void)amendAccesibilityLabel {
|
||||||
NSString *amendment = [MVMCoreUIUtility hardcodedStringWithKey:@"top_alert_notification"];
|
NSString *amendment = [MVMCoreUIUtility hardcodedStringWithKey:@"top_alert_notification"];
|
||||||
if (![self.buttonView.label.accessibilityLabel hasPrefix:amendment]) {
|
NSString *accessibilityLabel = self.buttonView.label.accessibilityLabel;
|
||||||
self.buttonView.label.accessibilityLabel = [NSString stringWithFormat:@"%@ - %@", amendment, self.buttonView.label.accessibilityLabel];
|
if (!accessibilityLabel) {
|
||||||
|
// The accessibility label is nil when in non-voice over mode. Therefore assign the label text for the voice over is turned on mid-session (i.e. testers 🤦).
|
||||||
|
accessibilityLabel = self.buttonView.label.text;
|
||||||
|
}
|
||||||
|
if (accessibilityLabel && ![accessibilityLabel hasPrefix:amendment]) {
|
||||||
|
self.buttonView.label.accessibilityLabel = [NSString stringWithFormat:@"%@ - %@", amendment, accessibilityLabel];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user