-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessibility support for iCarousel #653
base: master
Are you sure you want to change the base?
Conversation
@nicklockwood Just merge your change into this pull request so that it does not have conflict. Please let me know if any suggestions/comments. |
Thanks for doing this - much appreciated. It will take me a little while to review as I have another project that I'm working on, but it looks great! |
@nicklockwood Thanks. Would love to update the documentation or any other parts correspondingly if needed. Feel free to let me know. |
@nicklockwood Any chance to take a look? |
@nicklockwood Do you prefer to have the accessibility support to be part of the iCarousel? If that would make it easier, please let me know and I will make the change. |
@JinlianWang thank you for this commit! |
Bump @nicklockwood |
+1 |
Guys could you merge it? |
The current accessibility support for iCarousel is minimal and un-desirable for most cases. Using UIAccessibilityTraitAllowsDirectInteraction, it allows users to interact with the widget directly using swipe left/right under VoiceOver. However, at the same time, it does not allow VoiceOver to move its focus to the next/previous elements (sibling of iCarousel) once the focus is on iCarousel, through standard way of one finger swiping left/right. It also has other limitations such as it does not interact with users by notifying them through voice what item of iCarousel they are working with under VoiceOver mode.
For this pull request, we attempt to solve this problem through two categories. Each category fits a different scenario and users are encouraged to choose one that fits their needs. The 'iCarousel+AccessibilityScrolling' category is a general fit for most cases: in accessibility mode, it would allow users to scroll to previous/next item of iCarousel through three-finger swipe left/right. According to Apple Verifying App Accessibility on iOS(https://developer.apple.com/library/ios/technotes/TestingAccessibilityOfiOSApps/TestAccessibilityonYourDevicewithVoiceOver/TestAccessibilityonYourDevicewithVoiceOver.html#//apple_ref/doc/uid/TP40012619-CH3-SW2), it is the standard way of "navigate to the next or previous page". Another category is "iCarousel+AccessiblityButtons", once deployed, this category would empower iCarousel with two auxiliary buttons under VoiceOver mode. One allows 508 users to browse to previous items of iCarousel while the other to browse to the next items. The buttons are removed once users turns off VoiceOver mode.
I have added the first category to Advanced iOS Demo project and the second one to Paging Example project to help users to see them in actions.