customized accessibility for cell

This commit is contained in:
Kevin G Christiano 2020-04-28 08:33:23 -04:00
parent 9b570c1a9a
commit 8e47e4ceb3
3 changed files with 11 additions and 9 deletions

View File

@ -127,7 +127,7 @@ import UIKit
func updateAccessibilityLabel() {
if let state = MVMCoreUIUtility.hardcodedString(withKey: isSelected ? "radio_selected_state" : "radio_not_selected_state") {
accessibilityLabel = String(format: MVMCoreUIUtility.hardcodedString(withKey: "radio_desc_state") ?? "%@%@", "", state)
accessibilityLabel = state
}
}

View File

@ -100,7 +100,7 @@ import UIKit
message += headlineLabel + ", "
}
if let bodyLabel = eyebrowHeadlineBodyLink.eyebrow.text {
if let bodyLabel = eyebrowHeadlineBodyLink.body.text {
message += bodyLabel
}

View File

@ -301,11 +301,13 @@
[weakSelf.viewToLayout layoutIfNeeded];
};
void(^completion)(void) = ^(void) {
//accessibility - added to make only top alert label and close button accessible. Posted notification when top alert is displayed
weakSelf.accessibilityElements = @[weakSelf.buttonView];
weakSelf.shortView.isAccessibilityElement = NO;
weakSelf.buttonView.label.accessibilityLabel = [NSString stringWithFormat:@"%@ - %@", [MVMCoreUIUtility hardcodedStringWithKey:@"top_alert_notification"],weakSelf.buttonView.label.accessibilityLabel];
void(^completion)(void) = ^(void) {
UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, weakSelf.buttonView.label);
[operation markAsFinished];
};