Skip to content

Comprehensive macOS HIG compliance sweep#635

Merged
datlechin merged 2 commits intomainfrom
refactor/hig-compliance-sweep
Apr 8, 2026
Merged

Comprehensive macOS HIG compliance sweep#635
datlechin merged 2 commits intomainfrom
refactor/hig-compliance-sweep

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

Full macOS Human Interface Guidelines compliance sweep across 67 files, covering 5 categories:

1. System semantic colors (~46 instances, 30 files)

  • Replace .foregroundStyle(.red/.green/.orange/.yellow/.blue/.purple) with Color(nsColor: .systemRed) etc.
  • Replace Color.white with Color(nsColor: .alternateSelectedControlTextColor) in VimModeIndicatorView
  • Ensures proper adaptation to high-contrast mode and dark mode

2. Accessibility labels + hit targets + popover escape (~20 instances, 15 files)

  • Add .accessibilityLabel(String(localized:)) to 15 icon-only buttons (font steppers, trash, clear, dismiss)
  • Add .frame(width: 24, height: 24) to 4 buttons with inadequate hit targets
  • Add .onExitCommand to SafeModeBadgeView and PaginationControlsView popovers
  • Refactor ResultTabBar: replace .onTapGesture with Button for keyboard/VoiceOver support

3. Font sizes → theme tokens (53 instances, 23 files)

  • Replace hardcoded .font(.system(size: 10/11/12/13/15)) with ThemeEngine.shared.activeTheme.typography.*

4. Corner radius → theme tokens (32 instances, 19 files)

  • Fix 3 deprecated .cornerRadius().clipShape(RoundedRectangle(...))
  • Replace 29 hardcoded cornerRadius: 4/6/8 with theme cornerRadius.small/medium/large

5. Localize strings (30 instances, 12 files)

  • Wrap 27 .help("...") tooltips with String(localized:)
  • Wrap 3 .alert("...")/TextField("...") strings

Test plan

  • Build succeeds
  • Toggle System Preferences > Accessibility > Display > Increase Contrast — verify status colors adapt
  • Enable VoiceOver (Cmd+F5) — navigate icon buttons, verify labels are announced
  • Open safe mode popover → press Escape → verify it dismisses
  • Open pagination settings popover → press Escape → verify it dismisses
  • Check result tab bar — verify tabs are clickable and keyboard-navigable
  • Visual spot-check: Import/Export dialogs, connection forms, sidebar, settings

@datlechin datlechin merged commit 89deb0c into main Apr 8, 2026
2 checks passed
@datlechin datlechin deleted the refactor/hig-compliance-sweep branch April 8, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant