Design comparison
Solution retrospective
It was a pretty ease one. Didn't have any difficulties along the way. One thing I think would be cool to implement is the typewriter animation when the advice comes in. I googled it a little but no results.
Community feedback
- @deepak-parmarPosted over 2 years ago
@vasyaqwe,
For typewriter animation you can use JavaScript's
setInterval()
function to add each letter to.advice-text
paragraph once advice is fetched. https://developer.mozilla.org/en-US/docs/Web/API/setIntervalStill, this would take some research. I'm sure you'll have fun.
And for the accessibility issue, I suggest use
h1
for the.advice-number
element instead ofspan
, because screen reader devices won't know where to start reading the content without a landmark element such ash1
. You've already setfont-size
for.advice-number
so usingh1
won't affect the design but will improve accessibility of your app.Hope these helps. 👍
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin 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