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

VoiceOver support #1

Merged
merged 6 commits into from
Oct 5, 2017
Merged

VoiceOver support #1

merged 6 commits into from
Oct 5, 2017

Conversation

lennet
Copy link
Contributor

@lennet lennet commented Oct 4, 2017

Checklist

Motivation and Context

The current implementation isn't really usable for users that rely on assistive technologies especially with VoiceOver. Additionally, there is currently no way for developer that are using this framework to make their implementations accessible. This PR aims to provide a usable VoiceOver support per default and additionally provides public apis for developers to create a better experience.

I tested my changes on my device (iPhone 6, iOS 11.02) with VoiceOver and Switch Control enabled.

Description

Images are currently not accessible at all for VoiceOver users. I introduced a new variable imageAccessibilityLabel to PageBulletinItem to enable developers to add a description to their images. Images without description stay hidden for VoiceOver users.

Tapping on empty areas isn't easy or impossible for visually impaired users. Therefore, I added support for the escape gesture (swiping a Z with two fingers) for VoiceOver users and the escape button for Switch Control users if the current BulletinItem isDismissable.

As this projects only uses a single ViewController for different items and doesn't uses a UINavigationController, the assistive technologies doesn't get notified that the screen and their content changes. Therefore, I added UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, newArrangedSubviews.first) which notifies the system to recalculate the accessibility tree and additionally moves the focus back to the first element of the new item instead of keeping the focus on the tapped button.

I also added the UIAccessibiltyTraitHeader to titleLabel to support VoiceOvers header rotor.

accessibilityViewIsModal makes sure that VoiceOver ignores all the elements behind the current BulletinBoard which would otherwise still be accessible via VoiceOver.

@alexisakers alexisakers merged commit 1e5bbdf into alexisakers:master Oct 5, 2017
@alexisakers
Copy link
Owner

Thank you very much for your contribution! 👍

a2 pushed a commit that referenced this pull request Sep 15, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants