Autoplay

Must Not

Audio must not play automatically unless the user is made aware this will happen or a pause/stop/mute button is provided.

Description

Audio in AV and interactive content can be disruptive for screen reader users because it can conflict with and speak over the screen reader. Unexpected audio may also distress users with cognitive or sensory sensitivity.

Users should be given a choice to opt in for auto-playing content audio. Where a pause/stop/mute button is provided instead, it must be fully and immediately accessible.

Where play automatically continues to the next content item, this must be indicated in an accessible way, with a choice to opt out and sufficient time to do so.

User preferences should persist.

IOS

Provide a button or link along with the controls for the audio playback that will start the audio. Do not call the play method directly after loading the audio in app unless creating the audio when initiated by the user.

iOS example

 
AVAudioPlayer *audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:nil];
[audioPlayer prepareToPlay];
UIButton *playButton = [UIButton buttonWithType:UIButtonTypeCustom]; 
[playButton setTitle: NSLocalizedString(@"Play", @"Button title")]                        
AVAudioPlayer *audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:nil];
[audioPlayer prepareToPlay];
[audioPlayer play];                        

ANDROID

Video content should open in it's own screen using the native player. No action is needed for autoplay as Android automatically decreases the volume of playback in order to allow Talkback users to hear speech output. Consider forewarning new users. 

Android example

<Button android:id="@+id/pause_button" android:src="@drawable/pause" android:contentDescription="@string/pause"/>                        

HTML

Do not play audio automatically unless there is a setting where the user can opt in before content is autoplayed or the user is forewarned.

TESTING

 

Procedures
  1. Activate a screen reader.
  2. Locate audio content that plays automatically.
  3. Check that the containing page does not play audio automatically when it loads while a screen reader is active, or that the user is pre-warned and a control is provided to stop or pause the audio.
Results

Either of the following checks are true:

  • Audio content does not play automatically when a screen reader is running.
  • The user is pre-warned that audio will automatically play and there is a control to stop or pause the audio.