Skip to content
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 / VoiceOver reading order should be left to right (or numeric order), not top to bottom #466

Closed
h-bomb opened this issue Nov 1, 2016 · 5 comments

Comments

@h-bomb
Copy link

h-bomb commented Nov 1, 2016

For locales with left to right reading order, if the accessibility setting, VoiceOver, is enabled, the reading order of the calendar days should be left to right or in numeric order (or from the first day in the calendar forward). This is potentially an issue for users with a vision impairment that, for example, rely on swiping through app features.

To replicate this issue on the simulator, do the following:

Steps assume Xcode 8.x...

  1. Download, build and run the latest SwiftExample project/app (as of 11/1/2016).
  2. Click InterfaceBuilder or LoadView.
  3. From the Xcode menu, select Open Developer Tool > Accessibility Inspector.
  4. Place the simulator and Accessibility Inspector side by side (see video below).
  5. From the top left drop-down menu on the Accessibility Inspector, select your running simulator.
  6. Click the Inspection icon if it's not already selected (circle with an i in the center).
  7. Click the crosshairs icon (if you hover over it, you'll see the tooltip, Start inspection follows point).
  8. Click on any day on the calendar to inspect it. (A light green rectangle should display around the day.)
  9. Under QuickLook on the Accessibility Inspector, use the left or right arrows to navigate.

Result:

Notice that the traversal direction is top to bottom (or bottom to top). This corresponds to the same reading order in VoiceOver. If you are able to deploy the SwiftExample on a device, you can enable VoiceOver and swipe through the days to confirm the reading order is the same.

Here is a video demonstrating the issue.

For our current project, providing a fully accessible calendar is a hard requirement, so we will have to modify (fork) FSCalendar to ensure the days are read in numeric order (or from the first day in the calendar forward)...unless this can be changed soon or at least made an option.

@WenchaoD
Copy link
Owner

WenchaoD commented Nov 3, 2016

Thanks @h-bomb. I didn't know about VoiceOver before. The UICollectionViewFlowLayout is the reason for the top-to-bottom order of the cells, which also makes the date calculation a bit complicated.

@h-bomb
Copy link
Author

h-bomb commented Nov 3, 2016

Hi @WenchaoD - thanks for the quick response. Yes, that is what I suspected. I've been researching how to change the reading order and will let you know what I discover, but if you happen to have an idea, would much appreciate the info! I believe I will need to implement one or more methods in UIAccessibilityContainer to achieve the desired behavior.

@WenchaoD
Copy link
Owner

This is fixed by entirely rewritten the behaviors of UICollectionViewFlowLayout. Would appreciate if you try in development branch.

@h-bomb
Copy link
Author

h-bomb commented Jan 3, 2017

Hi @WenchaoD - Thank you for providing this fix. In my preliminary testing efforts, I did find a few issues - all assume VoiceOver is enabled:

(1) Assuming month view, if you set calendar.placeholderType = .none, on the first load of the calendar, after right swiping from the last day of the week, e.g. Sat, the next right swipe selects the first placeholder and reads the hidden number in the day cell instead of selecting (and reading) the first day of the month. This seems to only happen after the first load of the calendar. On subsequent swipes, the first placeholder is no longer selected and the first day of the month is correctly selected.

(2) This may need to be reported as a separate VoiceOver issue since it is not related to the navigation / selection / speaking order issue. If you swipe right from the last navigation bar item to the next item (in the calendar), notice that the header date (e.g., January 2017) switches to the minimum date, e.g.: December 1969.

(3) Not sure if this is related, but selecting the LoadView option in the sample swift app crashes the app.

Other than these issues, the navigation / traversal / speaking order of the week days is now left to right, instead of top to bottom, so that's great!

Please let me know if you need additional details or a video demonstrating any of the issues above.

@WenchaoD
Copy link
Owner

Closing fixed issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants