Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Advice Generator App (SASS + JS + BEM + Mobile-first)

#bem#fetch#sass/scss#accessibility

@MelvinAguilar

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

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

@mdabdulrahman

Posted

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 button

Marked as helpful

1

@MelvinAguilar

Posted

@mdabdulrahman Hey, there! 👋 Thank you for the suggestion. I'll keep it in mind. 👍

1

@abhijithmuthyala

Posted

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 to polite instead of assertive would be better since it doesn't interrupt what the screen reader is currently reading - More info on MDN. I used aria-live='polite' on the new advice text in my solution and the screen reader(NVDA) reads out the new advice.

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

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