accessibility PLAY button: no speak or add a delay?

Hello,

I'm developing an app that plays a short audio when you push a button. When I'm testing VoiceOver and "push" the button, the voice says "Play button, playing..." over the audio I'm playing, and it is impossible to listen to it.

What do you think is the best approach?

I would like to add a delay to my audio, but I could not see a callback when the voiceOver said the sentence.

Is it correct to remove the accessibility label for this kind of buttons (play/pause/stop)?

Thanks!

Answered by Engineer in 702515022

You want to add the startsMediaSession trait to this button using the accessibilityTraits property. This will tell VoiceOver that audio will be playing as a result of the button press and it will act accordingly:

https://developer.apple.com/documentation/uikit/uiaccessibilitytraitstartsmediasession?language=objc

Accepted Answer

You want to add the startsMediaSession trait to this button using the accessibilityTraits property. This will tell VoiceOver that audio will be playing as a result of the button press and it will act accordingly:

https://developer.apple.com/documentation/uikit/uiaccessibilitytraitstartsmediasession?language=objc

Thanks!

accessibility PLAY button: no speak or add a delay?
 
 
Q