mdn / developer-portal

The code that generates the MDN Web Docs Developer Portal.
Mozilla Public License 2.0
61 stars 38 forks source link

1741: Make rendering of iframed video embeds better in the Video page #1757

Closed stevejalim closed 3 years ago

stevejalim commented 3 years ago

This changeset improves the accessibility of embedded videos and fixes an overlooked HTML validation error.

(Related issue #1741)

Key changes:

Example:

BEFORE <iframe width="480" height="270" src="https://www.youtube.com/embed/xTH0hb1nYoE?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

AFTER: <iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" height="270" src="https://www.youtube.com/embed/xTH0hb1nYoE?feature=oembed" title="Interview with Stan Leong" width="480">

How to test