DEV Community

Discussion on: Lazy load embedded YouTube videos

Collapse
 
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: codepen.io/aardrian/pen/pMVWxQ

Debug view: s.codepen.io/aardrian/debug/pMVWxQ

Collapse
 
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 😞

Collapse
 
haggen profile image
Arthur Corenzan

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

Collapse
 
doveranalyst profile image
RJ Mrunmayee

Hi! I wrote you a reply here:
doveranalyst.com/2020/12/how-to-lo...

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.