Repository navigation
Conversation
NavItemView, NavItemWithStatusView, and BottomNavItemView now expose accessibilityLabel, accessibilityAddTraits(.isButton), and accessibilityIdentifier to the macOS Accessibility API. This enables VoiceOver navigation and agent-swift automated testing via `find key sidebar_dashboard click`. Fixes friction #8 from Issue #5784. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Greptile SummaryThis PR adds VoiceOver and programmatic UI testing support to the three sidebar navigation components ( Key changes:
Issues found:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[SidebarView] --> B[NavItemView]
A --> C[NavItemWithStatusView]
A --> D[BottomNavItemView]
B --> B1[".accessibilityLabel(label)"]
B --> B2[".accessibilityAddTraits(.isButton)"]
B --> B3[".accessibilityIdentifier('sidebar_<label>')"]
B2 --> B4{"isLocked?"}
B4 -- "true (no interaction)" --> B5["⚠️ Still announces as button"]
B4 -- "false" --> B6["✅ Correct button behavior"]
C --> C1[".accessibilityLabel('label (On/Off)')"]
C --> C2[".accessibilityAddTraits(.isButton)"]
C --> C3[".accessibilityIdentifier('sidebar_<label>')"]
D --> D1[".accessibilityLabel(label)"]
D --> D2[".accessibilityAddTraits(.isButton)"]
D --> D3[".accessibilityIdentifier('sidebar_<label>')"]
Last reviewed commit: "Add accessibility la..." |
| .accessibilityAddTraits(.isButton) | ||
| .accessibilityIdentifier("sidebar_\(label.lowercased().replacingOccurrences(of: " ", with: "_"))") |
There was a problem hiding this comment.
Locked items incorrectly announced as buttons
When isLocked is true, the .onTapGesture silently does nothing (guard !isLocked else { return }), but .accessibilityAddTraits(.isButton) is unconditionally applied. VoiceOver users will hear the item announced as an interactive button, try to activate it, and receive no feedback — making the UI feel broken or unresponsive to them.
The trait should be conditional on the locked state, and a hint should communicate the locked status:
| .accessibilityAddTraits(.isButton) | |
| .accessibilityIdentifier("sidebar_\(label.lowercased().replacingOccurrences(of: " ", with: "_"))") | |
| .accessibilityAddTraits(isLocked ? [] : .isButton) | |
| .accessibilityHint(isLocked ? "Locked" : "") | |
| .accessibilityIdentifier("sidebar_\(label.lowercased().replacingOccurrences(of: " ", with: "_"))") |
|
Hey @beastoin 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! 💜 |
Summary
accessibilityLabel,accessibilityAddTraits(.isButton), andaccessibilityIdentifierto all three sidebar navigation view components:NavItemView,NavItemWithStatusView, andBottomNavItemViewsidebar_dashboard,sidebar_chat,sidebar_memories, etc.find key sidebar_dashboard click)Test plan
xcrun swift build)find key sidebar_dashboardreturns the Dashboard nav itemFixes friction #8 from #5784.
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 [email protected]