Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Cannot read properties of null (reading 'code')
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 using an api and flex

@Gab-Ferreira

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


If you have any advices please tell me

Community feedback

Ahmed Bayoumi 6,800

@Bayoumi-dev

Posted

Hey! It looks great!...

My suggestions:

  • Buttons must have the discernible text, So don't leave the alt attribute empty when using the image img 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 one h1 per page of the document... in this challenge, you will use h1 just to avoid the accessibility issue that appears in the challenge report... but don't use h1 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 helpful

0

@tesla-ambassador

Posted

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. ie button { 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 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