Accessible HTML Video “Facades”

Jason Knight
CodeX
Published in
9 min readApr 22, 2023

--

Photo by Shubham Dhage on Unsplash

One of the biggest problems in building fast loading websites is that a lot of times you’re stuck using third party assets that are — to be brutally frank — utter and total shite. Topping the list of such code is anything Google related.. and by extension that means YouTube.

NOTE, I’ve written a followup to this which better explains WHY you would want to do this.
https://deathshadow.medium.com/better-explaining-the-reason-for-video-facades-f774d9795c03

It’s almost comedy gold that in both PageSpeed insights and Google Lighthouse you actually get penalized for using Google Fonts, Google Analytics, Google AdSense, and even the official <iframe> code of YouTube videos.

Though I admire their honesty in creating a tool that admits their own code and techniques are a hot wet mess. Unlike certain websites I could mention that would special-case that out. if (user === "elon") if you know what I'm saying. We could chalk this up to the left hand not knowing what the right is doing, if not for the fact it’s been this way since lighthouse launched, a lot of site owners and developers constantly gripe about it, and they’ve taken no “corrective action” to either kill off lighthouse as quick as it launched, or again modify it to ignore their own failings.

--

--

Jason Knight
CodeX

Accessibility and Efficiency Consultant, Web Developer, Musician, and just general pain in the arse