From 0ff9d7aa27a949daf1651857b65a3a145e74759d Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Fri, 13 Mar 2026 06:46:38 -0700 Subject: [PATCH] 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 Co-authored-by: Claude Opus 4.6 --- Sources/cmuxApp.swift | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Sources/cmuxApp.swift b/Sources/cmuxApp.swift index f5cf3f21..161c0cfc 100644 --- a/Sources/cmuxApp.swift +++ b/Sources/cmuxApp.swift @@ -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)