Skip to content
Submitted 19 days ago

Launch countdown with Astro

astro, typescript, accessibility
LVL 2
Arn.28•165
@arn28
A solution to the Launch countdown timer challenge

Solution retrospective


What are you most proud of, and what would you do differently next time?

I'm most proud of the CSS-only split-flap animation and the discipline of building the whole project phase by phase from docs/PLAN.md, with acceptance criteria per step (tokens → layout → a11y → logic → animation → QA). Next time I'd scope the animation to fewer DOM pieces from the start — narrowing the problem to "which half shows which value during the 600ms window" was what finally made it solvable. I'd also persist the countdown target with localStorage and self-host the font with @fontsource.

What challenges did you encounter, and how did you overcome them?
  • The flip handoff: getting a real split-flap sequence without flickers. Solved by having the bottom half keep the old value until the flap lands, while the top half reveals the new one at the start of the animation.
  • Accessibility: Lighthouse caught aria-label on a plain div with no role — valid ARIA doesn't mean useful ARIA. Fixed by making each unit a labeled role="group", which gave Lighthouse Accessibility 100.
  • Deploying to GitHub Pages: absolute asset paths break under a subpath. Solved with import.meta.env.BASE_URL and CSS variables for the background images, so local dev and CI builds (with --base) share the same code.
What specific areas of your project would you like help with?
  • Is there a cleaner, more modern CSS approach for the split-flap (e.g. view transitions or a scroll-driven workaround) that would simplify the two-flap handoff?
  • Is my timer accessibility pattern solid for screen readers (role="timer" + aria-live="off", per-unit labeled groups), or would you announce progress differently?
Code
Loading...

Please log in to post a comment

Log in

Community feedback

No feedback yet. Be the first to give feedback on Arn.28’s solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord