0

I'm trying to force VoiceOver to stop when an audio component is tapped on on iOS mobile. All I see in the documentation is a statement and theoretical explanation that accessibilityTraits StartsMedia does this, but could not find any real implementation. Is it correct to set accessibilityTraits={RX.Types.AccessibilityTrait.StartsMedia} property on the RX.View ?

slugolicious
  • 15,824
  • 2
  • 29
  • 43
1011sophie
  • 237
  • 3
  • 9

1 Answers1

0

https://developer.apple.com/documentation/uikit/uiaccessibility/uiaccessibilitytraits/1620173-startsmediasession sounds like it's pretty clear, although it talks about startsMediaSession, not StartsMedia, but perhaps the OP meant startsMediaSession.

Use this trait to silence the audio output of an assistive technology, such as VoiceOver, during a media session that should not be interrupted. For example, you might use this trait to silence VoiceOver speech while the user is recording audio.

Another explanation is on Deque's site.

When a VoiceOver user double taps the screen on a button, the button is clicked, and the label of the button repeated to the user. This would obviously be frustrating if the purpose of the button were to play a sound! Especially a short sound. Interrupting the first few seconds of Yellow Submarine isn’t the end of the world, but what if a user is checking out new alert sounds? The sound may be shorter than the announcement! This would be highly frustrating. Applying this trait to a button stops this behavior, canceling any announcement, allowing sounds played as a result of interaction with the control to be heard.

slugolicious
  • 15,824
  • 2
  • 29
  • 43