SwiftUIPager icon indicating copy to clipboard operation
SwiftUIPager copied to clipboard

[BUG] Cannot navigate through pages using VoiceOver

Open KostiantynDA opened this issue 3 years ago • 2 comments

Cannot navigate through pages using VoiceOver

To Reproduce Turn on VoiceOver and try to change a page

Expected behavior Pager should scroll to the next and previous items

Screenshots / Videos https://user-images.githubusercontent.com/108671935/187481711-14884d66-5c20-4c89-921f-3dfd220e281b.mov

Environment:

  • iOS 15.6.1
  • iPhone 12 Pro
  • SwiftUIPager version 2.3.2

KostiantynDA avatar Aug 30 '22 15:08 KostiantynDA

+1 on this, it would be great for our VoiceOver users

sdavidliu avatar Sep 13 '22 20:09 sdavidliu

To scroll using single finger swipe up/down during voice over focus, I had to add this modifier to the Pager component:

EDIT: Does not seem to be triggering the onPageChanged event

.accessibilityAdjustableAction({ direction in
    switch direction {
    case .increment:
        withAnimation {
            page.update(.next)
        }
        break
    case .decrement:
        withAnimation {
            page.update(.previous)
        }
        break
    @unknown default:
        break
    }
    
})

aechaves avatar Apr 16 '23 21:04 aechaves