Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 6 months ago

Advice Generator

sass/scss
P
Øystein Håberg•13,260
@Islandstone89
A solution to the Advice generator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I'm satisfied using the fetch API! I also used npm to setup and build the project, as well as doing some configuration in package.json.

What challenges did you encounter, and how did you overcome them?

Positioning the button was somewhat challenging. I tried doing it with Subgrid, but in the end I ended up using absolute positioning.

What specific areas of your project would you like help with?

As always I'm open for any feedback :)

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Grace•32,130
    @grace-snow
    Posted 6 months ago

    This looks good, just a few small improvements to suggest:

    1. Instead of trying to set two competing assertive aria-live regions, wrap the whole card in ONE aria-live set to "polite". Because you have two at the moment they overrule each other, meaning only one will be announced. There is no reason why these would need to be assertive either.
    2. The Dice button label needs to begin with the word "dice" so that it is easy to activate for voice control users. E.g. "Dice - Generate new random advice". This is especially important as you've told people to click the dice button in the help text.
    3. It looks like this challenge intends for you to use the picture element for the divider images as different onese are provided for mobile vs desktop.
    Marked as helpful
  • Dylan Heslop•2,460
    @dylan-dot-c
    Posted 6 months ago

    This is a good solution, but thats why im here.

    I think(idk) that you are in jeopardy for getting 3rd place for mentor of the year and getting sidelined by the current 3rd place.

    I don't know if you care about the 3rd place and the free 1-year fem premium but I just wanted to let you know, and maybe try and help you if you actually care about it in some way.

    Just a random guy tho.

    Also checko out my solution and tell me what you think.

    Marked as helpful

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub