Question

I noticed that the UIAccessibility post notification method is some kind of asynch call. This sounds to me quite right because you need to ear last events and not those happened yesterday... But see this example:

UIAccessibilityPostNotification( UIAccessibilityAnnouncementNotification, @"String 1");
UIAccessibilityPostNotification( UIAccessibilityAnnouncementNotification, @"String 2");

You can ear only "string 2".

This example is quite simple, you could answer that one can append "string 2" to "string 1" and the problem is solved. But I'm in a situation such that, but I can't append two string.

My question is: is there a method to synchronize notifications?

Another example is the following. Let say that you have a tab-bar app. When you switch to a particular bar I'd like VoiceOver to say specific text. As you probability know, when you select a tab VoiceOver says itself something like "Bar1 bar selected".

So... the VoiceOver announcement cover my own specific text.

Was it helpful?

Solution

For iOS 6.0+ you may use UIAccessibilityAnnouncementDidFinishNotification to synchronize your announcements.

OTHER TIPS

Since iOS 11, new attributed accessibility properties have been introduced including a specific accessibilitySpeechQueueAnnouncement key that enables to queue the announcement or to interrupt the current speech.

However, if you send many notifications and that VoiceOver needs to take over (the user flicks to focus a new element for instance), the notifications that weren't vocalized will be removed as soon as the system vocalizes the element's attributes (stackoverflow answer).

In my view, this is currently the best way to synchronize notifications.

And for your second request about tab bars, a new dedicated question could be written...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top