How building an HTML-first site doubled our users overnight
A contractor rebuilt a utility company’s user sign-up flow with an HTML-first, Astro-based form that works without JavaScript, stores each step server-side, and meets WCAG AA. By using simple form submissions, progressive enhancement, and a tiny web component for validation, form completions doubled overnight and users never lost their data.
- An HTML-first, server-rendered Astro rebuild (each wizard step a real page, plain form POSTs) doubled form completions overnight after a React version with spinners and localStorage-based image storage failed and was rolled back in three days.
- The "missing" users were real all along—JS-based analytics tools had been silently dropping people whose browsers/connections choked on the old JS bundles.
- A 1KB web component (validation-enhancer) added accessible, non-intrusive validation on top of native HTML form validation without sacrificing progressive enhancement or WCAG AA compliance.
- Storing each step's data server-side meant users never lost progress, even resuming an application a month later.
My client was a regulated utility facing fines if customer satisfaction dipped below 96%. Their legacy options for service applications were an old ASP form and a manual, costly process. Two previous attempts—including a React-based form—failed spectacularly. The React app lived for three days before being rolled back: it relied on loading spinners, global JavaScript state, wasn’t accessible, and tried to stash images in localStorage, which has a 5 MB cap.
I rebuilt the site using Astro with an HTML-first approach. JavaScript lived only in web components for progressive enhancement. Every step in the form wizard became its own HTML page. When users clicked “Next,” the form posted to the API and redirected on success. That kept things simple: no massive bundles, no client-side routing, just fast, reliable pages that work on old phones and flaky networks. Inspiration came from a story about someone using a PlayStation Portable to browse GOV.UK’s plain-HTML pages on shabby Wi-Fi.
Form validation got its own tiny web component called validation-enhancer. It wraps any HTML form, captures built-in browser validation, and puts error messages into aria-described elements. At 1 KB, it prevents obnoxious pop-ups, clears errors while users type, and always falls back to native HTML or server-side checks. Here’s how easy it is to use:
<validation-enhancer>
<form>
<label for="my-email">Email</label>
<input type="email" name="my-email" aria-errormessage="my-email-error" required />
<div id="my-email-error"></div>
<button type="submit">Submit</button>
</form>
</validation-enhancer>
Once live, form completions doubled overnight. The analytics team couldn’t track those new users because their JavaScript-based tools had been dropping anyone whose browser or connection failed on massive JS bundles. We also stored each step’s data on the backend so no one ever lost progress—even someone who finished their application a month later. My replacement complained this setup was extra work. I disagreed: public services can’t afford to bounce users on old browsers, bad networks, or assistive devices. Support the widest audience from day one.