Autoplay is disabled

A video set to autoplay starts playing as soon as the web page loads — it’s best to avoid this.

Meeting the Web Accessibility Standard

When a video does not play automatically, this meets WCAG 2:

If a video is set to play automatically and controls are provided to pause or stop the video, it meets the same WCAG Success Criteria as a video that is set not to play automatically.

However, to prevent a negative experience for some users, as described above, it’s best not to set your video to play automatically.

On this page

Avoid setting a video to play automatically

Generally, it’s recommended that videos not play automatically.

Fortunately, embedded video players from YouTube or Vimeo do not play automatically by default. And browsers like Chrome, Firefox, and Safari now usually block videos from playing automatically, even if the video itself is set to autoplay.

How autoplay reduces accessibility

Some people can find a video clip that starts automatically to be so distracting that it prevents them from being able to focus on anything else on the page or to listen to their screen reader.

Unexpected video or audio can be disruptive for people:

For more about accessibility issues with media that plays automatically, see F93: Failure of Success Criterion 1.4.2 for absence of a way to pause or stop an HTML5 media element that autoplays — W3C.

How to disable autoplay

In most cases, nothing needs to be done to prevent videos from playing automatically.

This is because:

However, there are some situations where YouTube or Vimeo videos could start playing automatically, depending on things like the user’s media viewing habits or browser settings.

To be sure that a video will not play automatically:

Example of <iframe> markup to disable autoplay
<iframe src="https://www.youtube.com/embed/kh6Yab0GOTE?autoplay=0" title="YouTube video: An explanation of what human rights are — presented in New Zealand Sign Language" width="300" height="150" allowfullscreen>

Setting the autoplay parameter on the URL in the src attribute ensures that the video will not play automatically when the page loads.

Example of <video> markup to disable autoplay
<video src="video.vid" controls width="300" height="150">

No autoplay attribute is present within the opening <video> tag.

If a video is set to autoplay

If a video is set to play automatically, you must provide the user with the option to stop it if the clip:

How to enable controls to pause or stop the video

Controls for videos embedded in an <iframe>

By default, YouTube and Vimeo videos include controls for pausing or stopping the video.

Other video players might behave differently, so it’s important to check that they provide such controls.

Controls for videos embedded using the HTML <video> element

If the HTML <video> element is not using custom controls, make sure that the controls attribute is present. This tells the browser to provide controls for things like starting and stopping the video.

Example of code that includes the controls attribute
<video src="video.vid" controls width="300" height="150">

The presence of the controls attribute ensures that users will have an easy way to stop and start the video.