diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m b/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m index 8994b340..a00603da 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m @@ -63,8 +63,13 @@ - (void)amendAccesibilityLabel { NSString *amendment = [MVMCoreUIUtility hardcodedStringWithKey:@"top_alert_notification"]; - if (![self.buttonView.label.accessibilityLabel hasPrefix:amendment]) { - self.buttonView.label.accessibilityLabel = [NSString stringWithFormat:@"%@ - %@", amendment, self.buttonView.label.accessibilityLabel]; + NSString *accessibilityLabel = 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]; } }