DEV Community

Discussion on: Lazy load embedded YouTube videos

aardrian profile image
Adrian Roselli • Edited

Three suggestions:

  • add a title attribute to the <iframe> (excluding it is a WCAG failure, one which Google continues to ignore),
  • consider a method to put a "Play" image over the video thumbnail so users understand it will play a video, and not just send them to a new page or load an image,
  • put an alt attribute on the image.

I mocked one up on CodePen:

Debug view:

ceap80 profile image
Cesar Arguinzones

The video is not autoplaying on my mobile device, a Moto G4 Play. For some reason I have to double click 😞

haggen profile image
Arthur Corenzan

Great suggestions! I have edited the article to reflect this change. Thank you!

doveranalyst profile image
RJ Mrunmayee

Hi! I wrote you a reply here:

It is working on desktop but on mobile devices the autoplay is not working.
And the Unicode use does not stay Unicode like. Have shared screenshots.
Please have a look.