WebAIM - Web Accessibility In Mind

E-mail List Archives

Youtube, embed options and accessibility

for

From: Björn Fisseler
Date: Jan 5, 2012 1:27AM


Dear list,

Youtube offers two different embedding options for videos, one using an
iframe and one using the old object/embed syntax. I wonder which of
these two options is better accessible.

Take e.g. this video: https://www.youtube.com/watch?v=QRS8MkLhQmM

The iframe option looks like this:
<iframe width="560" height="315"
src="http://www.youtube.com/embed/QRS8MkLhQmM" frameborder="0"
allowfullscreen></iframe>

As Google says, this option provides full compatibility including HTML5
support.

The object/embed option looks like this:
<object width="560" height="315"><param name="movie"
value="http://www.youtube.com/v/QRS8MkLhQmM?version=3&;amp;hl=de_DE"></param><param
name="allowFullScreen" value="true"></param><param
name="allowscriptaccess" value="always"></param><embed
src="http://www.youtube.com/v/QRS8MkLhQmM?version=3&;amp;hl=de_DE"
type="application/x-shockwave-flash" width="560" height="315"
allowscriptaccess="always" allowfullscreen="true"></embed></object>

This is much longer and is also not compatible with HTML5, which might
be an issue in the near future.

I know there are issues with the flash video player, which is not
accessible by keyboard within most browsers and should be supplemented
with accessible controls. But what about the two embed options? Which
one do you consider more accessible and why?

Thanks,

Bjoern