Design comparison
Solution retrospective
If you have any advices please tell me
Community feedback
- @Bayoumi-devPosted over 2 years ago
Hey! It looks great!...
My suggestions:
Buttons must have the discernible text
, So don't leave thealt
attribute empty when using the imageimg
inside the button<button>
without text.
<button class="btn"> <img src="./images/icon-dice.svg" alt="Advice Generator"> </button>
Or set the attribute
aria-label
to describe the button.Document should have one main landmark
, Contain the component with<main>
.
<main> <div class="container"> //... </div> </main>
-
Page should contain a level-one heading
, Change<p class="advice-id">advice #117</p>
to<h1 class="advice-id">advice #117</h1>
You should always have oneh1
per page of the document... in this challenge, you will useh1
just to avoid theaccessibility issue
that appears in the challenge report... but don't useh1
on small components<h1>
should represent the main heading for the whole page, and for the best practice use only one<h1>
per page. -
All page content should be contained by landmarks
, Contain the attribution with<footer>
.
<footer> <div class="attribution"> //... </div> </footer>
Hope this is helpful to you... Keep coding👍
Marked as helpful0 - @tesla-ambassadorPosted over 2 years ago
Hey Gabferreira, congrats on completing this challenge. This is a pretty solid solution. Here's a few pointers:
- You might wanna increase the height of the card a little bigger so that the words are more readable. The content is a bit too small.
- In order to solve your HTML validation issue, you don't need to place the
img
tag in between<button>
you could instead set the image as the background property of the button in your CSS. iebutton { background: URL('img_url');
- In order to resolve some of your accessibility issues, you might wanna use landmarks in your html code, these help browsers easily navigate your code. So you might consider wrapping your divs and sections in landmarks like
<main>
or<header>
or<footer>
you need to do this according to how your page is structured. Incase you want to know more about landmarks, follow this link. Happy coding and keep up the good work!
Marked as helpful0
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