Advice Generator App (SASS + JS + BEM + Mobile-first)
Design comparison
Solution retrospective
Hi there, Iβm Melvin and this is my solution for this challenge. π
- I add a delay and a spinner during loading to prevent the user from spamming the button. Do you think the spinner is accessible enough?
- What tips would you give me to improve the accessibility of the page?
Any feedback on how I can improve and reduce unnecessary code is welcome!
Thank you. :)
Community feedback
- @mdabdulrahmanPosted about 2 years ago
Hi @MelvinAguilar,
Your solution is really awesome π but one thing box shadow for dice button is showing only in bottom but in the design it should be all around the dice add this
box-shadow:0 0px 35px 1px #52ffa8;
CSS box-shadow code to dice button it will make box-shadow all around the dice buttonMarked as helpful1@MelvinAguilarPosted about 2 years ago@mdabdulrahman Hey, there! π Thank you for the suggestion. I'll keep it in mind. π
1 - @abhijithmuthyalaPosted almost 2 years ago
Hi, the loading spinner looks great! Few things I noticed:
-
The loading spinner keeps animating even when it is not visible, which might be unnecessary. Changing the animation declaration on
.loader::before
to.loader.visible::before
would only animate it when it is visible. -
While operating through keyboard (Enter / Spacebar), the focus state on the button is lost. I think it would be better to reset the focus back onto the button for better accessibility.
-
I've also been learning about accessibility, and from what I understand, setting
aria-live
topolite
instead ofassertive
would be better since it doesn't interrupt what the screen reader is currently reading - More info on MDN. I usedaria-live='polite'
on the new advice text in my solution and the screen reader(NVDA) reads out the new advice.
Marked as helpful0@MelvinAguilarPosted almost 2 years ago@abhijithmuthyala Thank you very much!!!
1 -
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