I’m developing an iOS app that I’d like to make fully accessible. Part of the app involves a sequence when playing cards are dealt, and then after user interaction, the hand ends and the next hand is dealt. When the hand has been dealt, I want to make impaired users aware.
So, after the hand is dealt (a sighted user sees the cards animate into place), I send a UIAccessibilityLayoutChangedNotification notification like so:
UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, nil);
When I verify in the Simulator using the Accessibility Inspector, everything looks fine: the notification is displayed. But, when I try to test using VoiceOver on a device, nothing seems to be happening. Is there something I’m missing here? How do I know that it works?
I believe that my thinking of how Voiceover works was a bit off. It seems like the UIAccessibilityLayoutChangedNotification isn’t something to notify the user, it’s to notify UIKit that voiceover elements have changed.
I wound up using a combination of sound effects and strategic use of the UIAccessibilityAnnouncementNotification notification to speak updates to the user.