Skip to content

DigiYatra case study: skeleton placeholder for legacy phone shots - #16

Merged
2002Bishwajeet merged 1 commit into
mainfrom
digiyatra-legacy-skeleton
Jun 14, 2026
Merged

2002Bishwajeet merged 1 commit into
mainfrom
digiyatra-legacy-skeleton

Conversation

@2002Bishwajeet

Copy link
Copy Markdown
Contributor

What

The legacy "before" screenshots in the DigiYatra case study are lazy-loaded. Before a shot painted — or on any slow/flaky connection, cache miss, or load failure — the phone bezel flashed its raw grey alt text ("The old DigiYatra login screen") plus the browser's broken-image glyph on a white screen. It looked like a broken phone. (This is the faint "bra" fragment a quick scroll catches.)

Fix (OldPhone only)

  • Bezel screen now carries a neutral skeleton (subtle grey gradient) instead of white.
  • color: transparent on the <img> hides the alt text visually — the attribute stays in the DOM, so screen readers still announce it.
  • onError hides the <img> outright, so a genuine load failure shows only the skeleton (no glyph).

The live "after" phones (real prototype component) are untouched.

Verified (Playwright, 390px @2x)

  • Loading/failed: clean skeleton panel — no alt text, no broken glyph.
  • Loaded: real redacted legacy screenshot renders perfectly; skeleton fully covered.
  • All 12 legacy-image alt attributes remain in the DOM (a11y intact).
  • astro check: 0 errors / 0 warnings / 0 hints. Production build green.

The legacy 'before' screenshots are lazy-loaded; before a shot painted (or
on any slow/flaky connection or load failure) the bezel flashed its raw grey
alt text and the browser broken-image glyph on a white screen, which read as
a broken phone. Give the bezel screen a neutral skeleton, hide the alt text
visually with color:transparent (the attribute stays for screen readers),
and hide the <img> on error so a hard failure shows only the skeleton.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 14, 2026 •

Copy link
Copy Markdown

Deploying ux4g with  Cloudflare Pages  Cloudflare Pages

Latest commit: c56b67d
Status: ✅  Deploy successful!
Preview URL: https://2dbd2788.ux4g.pages.dev
Branch Preview URL: https://digiyatra-legacy-skeleton.ux4g.pages.dev

View logs

@2002Bishwajeet
2002Bishwajeet merged commit b622f71 into main Jun 14, 2026
3 checks passed
@2002Bishwajeet
2002Bishwajeet deleted the digiyatra-legacy-skeleton branch June 14, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant