You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SwitchView: check the VoiceOver traits (only .isToggle, no button trait) #27
SwitchView (Components/Switch/SwitchView.swift) is an onTapGesture shape, not a Button or Toggle. Its only accessibility trait is .isToggle, and it sets an accessibilityValue of "On"/"Off" by hand.
This was found while reviewing #15 and is not a regression. iOS 17+ already ran this path, and #15 only removed the .isButton fallback for iOS 14–16.
Risk (not verified on a device)
The element has no button trait, so VoiceOver may not give the activation hint ("double-tap to toggle").
The state may be announced twice, once from accessibilityValue and once from the toggle trait.
Proposed fix
Run VoiceOver against a native Toggle and SwitchView side by side.
Then pick one:
accessibilityAddTraits([.isButton, .isToggle]), keeping or dropping the manual value depending on what VoiceOver reads;
or build the switch as a Toggle with a custom ToggleStyle, so it gets the system semantics for free.
Related: the accessibility audit of the shared components (ticket 32072).
Activity