Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 9044ce8

Browse files
committed
SignupMethodVC: Make VO select the first button
1 parent 73ac405 commit 9044ce8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

WordPressAuthenticator/Signin/LoginPrologueSignupMethodViewController.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,15 @@ class LoginPrologueSignupMethodViewController: NUXViewController {
105105

106106
private func configureForAccessibility() {
107107
dismissButton.accessibilityLabel = NSLocalizedString("Dismiss", comment: "Accessibility label for the transparent space above the signup dialog which acts as a button to dismiss the dialog.")
108+
109+
// Ensure that the first button (in buttonViewController) is automatically selected by
110+
// VoiceOver instead of the dismiss button.
111+
if buttonViewController?.isViewLoaded == true, let buttonsView = buttonViewController?.view {
112+
view.accessibilityElements = [
113+
buttonsView,
114+
dismissButton
115+
]
116+
}
108117
}
109118

110119
override func accessibilityPerformEscape() -> Bool {

0 commit comments

Comments
 (0)