Add VoiceOver selected traits to pickers and reorder settings (#1372)

Add accessibilityAddTraits(.isSelected) to Theme and App Icon picker
buttons so VoiceOver announces the active option. Reorder the top of
the App section to: Language, Theme, App Icon.

Addresses review feedback from https://github.com/manaflow-ai/cmux/pull/1367

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lawrence Chen 2026-03-13 06:46:38 -07:00 committed by GitHub
parent c7b54b78d6
commit 0ff9d7aa27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3442,15 +3442,6 @@ struct SettingsView: View {
VStack(alignment: .leading, spacing: 14) {
SettingsSectionHeader(title: String(localized: "settings.section.app", defaultValue: "App"))
SettingsCard {
ThemePickerRow(
selectedMode: appearanceMode,
onSelect: { mode in
appearanceMode = mode.rawValue
}
)
SettingsCardDivider()
SettingsCardRow(
String(localized: "settings.app.language", defaultValue: "Language"),
subtitle: appLanguage != LanguageSettings.languageAtLaunch.rawValue
@ -3482,6 +3473,15 @@ struct SettingsView: View {
SettingsCardDivider()
ThemePickerRow(
selectedMode: appearanceMode,
onSelect: { mode in
appearanceMode = mode.rawValue
}
)
SettingsCardDivider()
AppIconPickerRow(
selectedMode: appIconMode,
onSelect: { mode in
@ -4933,6 +4933,7 @@ private struct ThemePickerRow: View {
}
.buttonStyle(.plain)
.focusable(false)
.accessibilityAddTraits(isSelected ? .isSelected : [])
}
}
.layoutPriority(1)
@ -5014,6 +5015,7 @@ private struct AppIconPickerRow: View {
}
.buttonStyle(.plain)
.focusable(false)
.accessibilityAddTraits(isSelected ? .isSelected : [])
}
}
.layoutPriority(1)