All posts
WebflowGSAPAccessibility

What happens to an animated site when the JavaScript fails?

Short answer: it depends on how the motion was built. A lot of scroll animation works by hiding the text and images first and showing them when a script runs. If that script never runs, the content stays hidden and the page looks empty. You can check which kind of build you have before launch, and I explain how near the end.

Why this happens

Every reveal on a page is the page waiting for a script before it shows something it already has. Most of the time the script loads and nobody notices. But scripts load late, get blocked by a browser extension, or break after an edit that had nothing to do with the animation. When that happens on a site built the usual way, the visitor doesn't get a simpler version of the page. They get empty sections.

The annoying part is that nobody reports it. A visitor who sees a blank section just leaves, and in your analytics it looks like any other bounce.

It's not only the script failing

When I review a site with a lot of motion, I check three cases. Most people only think about the first one.

  • The script never starts. It fails to load or throws an error before it runs, and everything that was hidden stays hidden.
  • The visitor has reduced motion turned on. People set this in their operating system, for vestibular reasons or just because they prefer it. The easy fix is to switch the animation off, but if you switch it off in the middle of a sequence, elements stay frozen where they started, for example half faded or pushed off to the side.
  • The platform takes over. Webflow controls some states itself. Its mobile menu hides the panel as soon as it closes, so if you add a closing animation there is nothing left on screen to animate, and the menu just disappears.

How I built it on Fully Dialed

Fully Dialed calibrates the cameras and radar in modern cars for repair shops in British Columbia. The design and the motion direction came from their side, in Figma, and the page moves a lot: text that appears line by line, photo masks that open, radar patterns tied to the scroll. My part was building it so none of that could make the page fail. Their whole message is about safety, so a page that breaks without anyone noticing was the thing I wanted to avoid the most.

First, all the copy is in the HTML from the start. Search engines and screen readers get the full page whether the script runs or not.

Second, the content only gets hidden once the animation code has actually started. If the script never loads, nothing was hidden in the first place.

Third, there is a watchdog. If the motion layer doesn't report back within six seconds, it stops waiting and shows everything without animation.

For reduced motion I show the final state instead of turning the animation off. The rotating ticker is a good example: if I stopped it in the middle it would show half a word, so with reduced motion it renders in its final position. For the menu, I catch the moment Webflow closes it and keep the panel on screen just long enough to play the curtain animation in reverse. Then Webflow hides it as usual.

All the motion lives in one file of around 13 KB, and each section opts in with attributes on the page. I did it this way on purpose instead of setting up dozens of interactions by hand, because it was the only way I could make sure the rules above apply to every section and not just most of them.

What it still costs

The live site scores 90 for accessibility in Lighthouse, not 100, and the points it loses come from the motion layer. To animate a sentence line by line you split it into pieces, and then you have to describe the original sentence to assistive technology separately. The way that description is attached is what the audit flags.

I think it can be fixed. But it's also the real cost of the effect: every line that slides in is extra markup a screen reader has to make sense of. I prefer to show the 90 and explain where it comes from.

How to check your own site

You can do this on a staging link before launch. You don't need a developer for it.

  • Turn off JavaScript in your browser and reload the page. Everything you need to read should still be there, just without movement. If sections come up empty, the animation is in control of your content.
  • Turn on reduced motion (on a Mac: System Settings, Accessibility, Display, Reduce motion) and reload. Elements should appear in their final position, not frozen halfway.
  • Ask your developer what happens if the animation script doesn't load. If the answer is “it won't happen”, that's not really an answer.
  • Ask where the motion lives. If it's one file, it can be reviewed and fixed in one place. If it's fifty interactions set up by hand, that's fifty places where one can drift.

When I wouldn't build it this way

If your team needs to edit the animations themselves, a motion layer written in code is probably the wrong choice, because only a developer can change it. Webflow's own interactions are harder to keep consistent on a big site, but your team can open and edit them, and on a lot of sites that matters more.

And if the motion is just decoration and the budget is tight, I'd rather use less of it. Most of what I described here exists because the design had a lot of movement. With a few small animations, you don't need most of it.

start a project

Ready to build.

A few quick details so I can scope it before we even talk, or just email me directly.

hello@lucasmujica.dev
Buenos Aires · Remote worldwide

Hi Lucas, I'm from . I'm building a with a budget around . Reach me at .

The details that decide the price
Replies within a day