@Dytoma
Posted
Hey👋 Good job on completing this challenge.
However I do have some suggestions to improve your solution.
-The dice is supposed to on Click get provide a new advice to the user so instead of using a div to wrap it I will suggest using a button and add some accessibility to it. Instead of <div class="green-circle"><i class="fa-solid fa-dice-five black"></i></div>
I will suggest this code <button class="green-circle" aria-label="new advice"><i class="fa-solid fa-dice-five black" aria-hidden="true"></i></button>
.
You can read more about accessibility on MDN ARIA Docs 📚
- You can also select this button element in your
main.js
file and add anevent listener (click)
and trigger the function that fetches the advice as a call back.
Code: document.queryselector(button).addEventListener('click', () => getQuotes()
Happy coding😇
Marked as helpful
@mostafa93sh
Posted
@Dytoma Great idea , thanks for your time .
@Dytoma
Posted
@mostafa93sh You're welcome😇