Commit ddaa35c
Hide SwipeActionsView from the accessibility tree (#616)
When a list item has swipe actions, the `DefaultSwipeActionButton`
instances stayed in the accessibility tree even while the swipe was
closed — the buttons were positioned off-screen, so VoiceOver ignores
them under standard conditions but animations like rotation could still
expose them momentarily allowing selection of "Void"/"Repeat"/"Delete"
elements.
`SwipeActionsView` now starts with `accessibilityElementsHidden = true`
(matching its initial `.closed` state) and toggles in `apply(state:)`:
hidden while `.closed`, exposed once the actions are open/swiping. The
row's `accessibilityCustomActions` is unaffected, so VoiceOver can still
trigger swipe actions via the Actions rotor without opening the swipe;
once opened, the visible buttons are also reachable directly.
### Checklist
Please do the following before merging:
- [ ] Ensure any public-facing changes are reflected in the
[changelog](https://github.com/square/Listable/blob/main/CHANGELOG.md).
Include them in the `Main` section.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2d64590 commit ddaa35c
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
229 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
| |||
0 commit comments