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

Gabriel Barrosโ€ข 20

@gabrielbarrosg

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

Community feedback

Ahmed Bayoumiโ€ข 6,800

@Bayoumi-dev

Posted

Hey Gabriel, It looks good!... Here are some suggestions:

  • Document should have one main landmark, Contain the component with <main>.
<main>
   <div id="advice">
      //...
   </div>
</main>
  • An img element must have an alt attribute, to provide alternative information for an image if a user for some reason cannot view it, but in this case, add an empty alt attribute to avoid the accessibility issue because it is an unnecessary icon for the content.
<img class="divider" src="assets/images/pattern-divider-desktop.svg" alt="">
  • use <button onclick='generateAdvice()' id="advice-btn"> instead of <div onclick='generateAdvice()' id="advice-btn"> ... Buttons are used for actions
<button onclick='generateAdvice()' id="advice-btn">
    <img class="btn" src="assets/images/icon-dice.svg" alt="Advice Generator">
</button >
  • Page should contain a level-one heading, Change h3 to 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.

  • Use REM for font size, It is a must for accessibility because px in some browsers doesn't resize when the browser settings are changed... See this article ---> CSS REM โ€“ What is REM in CSS?

Hope this help!... Keep coding๐Ÿ‘

Marked as helpful

1

Gabriel Barrosโ€ข 20

@gabrielbarrosg

Posted

@Bayoumi-dev Thank you so much for the feedback, Ahmed ๐Ÿ˜. Your suggestions were very helpful, I'm definitely gonna improve my codes.

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