Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ struct WelcomeModalView: View {
.shadow(color: .black.opacity(0.15), radius: 6, y: 3)
}
.buttonStyle(.plain)
// The keycap is a visual hint; the title alone names the button.
.accessibilityLabel(title)
}

private func secondaryButton(title: String, hint: String, action: @escaping () -> Void) -> some View {
Expand All @@ -195,6 +197,8 @@ struct WelcomeModalView: View {
.overlay(Capsule().stroke(theme.borderColor, lineWidth: 1))
}
.buttonStyle(.plain)
// The keycap is a visual hint; the title alone names the button.
.accessibilityLabel(title)
}

private func quietTextButton(title: String, hint: String, action: @escaping () -> Void) -> some View {
Expand All @@ -208,6 +212,8 @@ struct WelcomeModalView: View {
.frame(maxWidth: .infinity, minHeight: 32)
}
.buttonStyle(.plain)
// The keycap is a visual hint; the title alone names the button.
.accessibilityLabel(title)
}

private func pillButton(title: String, hint: String, action: @escaping () -> Void) -> some View {
Expand All @@ -225,5 +231,7 @@ struct WelcomeModalView: View {
.overlay(Capsule().stroke(theme.borderColor, lineWidth: 1))
}
.buttonStyle(.plain)
// The keycap is a visual hint; the title alone names the button.
.accessibilityLabel(title)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,17 @@ final class NativeParityCaptureTests: XCTestCase {
app.launch()
let window = app.windows["Compass"]
XCTAssertTrue(window.waitForExistence(timeout: 15))
XCTAssertTrue(
window.descendants(matching: .any)["compass-native-welcome-modal"].waitForExistence(timeout: 15))
let welcome = window.descendants(matching: .any)["compass-native-welcome-modal"]
XCTAssertTrue(welcome.waitForExistence(timeout: 15))
sleep(1)
NativeImageSnapshotSupport.captureWindow(window, named: "onboarding-welcome")
window.buttons["Get started for free"].click()
window.buttons["Next"].click()
XCTAssertTrue(
window.buttons["Start free trial with Google"].waitForExistence(timeout: 8))
// Scope to the panel: the grid's own "Next" (week) button is still in
// the window's accessibility tree behind the modal.
welcome.buttons["Get started for free"].click()
welcome.buttons["Next"].click()
// The provider buttons depend on the backend config; the local-only
// choice is always on the account step.
XCTAssertTrue(welcome.buttons["On this device only"].waitForExistence(timeout: 8))
sleep(1)
NativeImageSnapshotSupport.captureWindow(window, named: "onboarding-welcome-account-choice")
}
Expand Down
Loading