diff --git a/Signal/src/ViewControllers/ProfileViewController.m b/Signal/src/ViewControllers/ProfileViewController.m index f83cd04c1..534394a28 100644 --- a/Signal/src/ViewControllers/ProfileViewController.m +++ b/Signal/src/ViewControllers/ProfileViewController.m @@ -349,10 +349,12 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat case ProfileViewMode_AppSettings: if (self.hasUnsavedChanges) { // If we have a unsaved changes, right item should be a "save" button. - self.navigationItem.rightBarButtonItem = + UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(updatePressed)]; + SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, saveButton); + self.navigationItem.rightBarButtonItem = saveButton; } else { self.navigationItem.rightBarButtonItem = nil; } diff --git a/SignalMessaging/Views/OWSAlerts.swift b/SignalMessaging/Views/OWSAlerts.swift index 7dd0e3d0f..a7bd25a2f 100644 --- a/SignalMessaging/Views/OWSAlerts.swift +++ b/SignalMessaging/Views/OWSAlerts.swift @@ -21,7 +21,10 @@ import Foundation settingsAction.accessibilityIdentifier = "OWSAlerts.\("settings")" alertController.addAction(settingsAction) } - CurrentAppContext().frontmostViewController()?.present(alertController, animated: true, completion: nil) + CurrentAppContext().frontmostViewController()?.present(alertController, animated: true, + completion: { + alertController.applyAccessibilityIdentifiers() + }) } @objc @@ -30,7 +33,10 @@ import Foundation owsFailDebug("frontmostViewController was unexpectedly nil") return } - frontmostViewController.present(alert, animated: true, completion: nil) + frontmostViewController.present(alert, animated: true, + completion: { + alert.applyAccessibilityIdentifiers() + }) } @objc @@ -61,7 +67,10 @@ import Foundation let okAction = UIAlertAction(title: actionTitle, style: .default, handler: buttonAction) okAction.accessibilityIdentifier = "OWSAlerts.\("ok")" alert.addAction(okAction) - fromViewController?.present(alert, animated: true, completion: nil) + fromViewController?.present(alert, animated: true, + completion: { + alert.applyAccessibilityIdentifiers() + }) } @objc @@ -76,7 +85,10 @@ import Foundation okAction.accessibilityIdentifier = "OWSAlerts.\("ok")" alert.addAction(okAction) - CurrentAppContext().frontmostViewController()?.present(alert, animated: true, completion: nil) + CurrentAppContext().frontmostViewController()?.present(alert, animated: true, + completion: { + alert.applyAccessibilityIdentifiers() + }) } @objc