Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 4 years ago

jQuery

uBsakuL•90
@uBsakuL
A solution to the Article preview component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello. This time I did on bigger dimensions (1440x800) and tried to be as accurate as possible. One question, how to change button arrow color? Tried color , and background-color, and fill, still nothing. So I did second button instead. If you have any advices, please feel free to share!

Code
Couldn’t fetch repository

Please log in to post a comment

Log in with GitHub

Community feedback

  • Adarsh Pratap•5,515
    @adarshcodes
    Posted over 4 years ago

    Hi @FitItGuy, you did good work on this solution. I think most of the things @SzymonRojek has already covered above so please go with the suggestion. Keep it up. Happy coding😀

  • Szymon Rojek•4,540
    @SzymonRojek
    Posted over 4 years ago

    FitItGuy

    Well done! :D

    I've just checked your HTML structure and preview site by the inspector. A few tips from me:

    • you can centre the card, give to the body overflow-hidden (it will stop the scroll);
    • RWD hasn't been done, did you learn flexbox + grid and BEM naming convention?
    • I'd recommend learning about semantic tags (why they matter). Divs are semantically inert elements — elements that don’t really do or say anything. You can change a bit the HTML structure by using semantic tags;
    • please change h5 into h1 => The h1 tag is the most important heading because it’s the highest level tag that shows what your specific page is about;
    • why did you add two buttons?
    • target=”_blank” attribute specifies where the linked document will open when the link is clicked (add it to the links);
    • you can fix your accessibility and HTML issues report;

    It is good to know semantics tags, additional attributes and their importance for accessibility. You will learn it step by step, day by day => for example, IMO you can add to the main button aria-controls, aria-label, aria-expanded and by JS you can toggle the text of the button aria label value, for example, "share" and "close share", toggle aria-expanded to true.

    In the end, I can recommend this article from the CSS-tricks: A Complete Guide to Links and Buttons.

    Ps. don't forget to upvote any comments on here that you find helpful.

    Many greetings :D

  • Szymon Rojek•4,540
    @SzymonRojek
    Posted over 4 years ago

    @adarshcodes and @FitItGuy,

    I have edited the post because of the type="button". I was sure that we do not have to type the button as a button, but now I think that depends on the situation, depends on the project. The default button type is actually submit (but we have got also type submit which is a bit confusing). This clarifies that there should be no post option, but just be a clickable object => we want to click and get the social media board, that's it. In this project, we can add type button - we are not submitting but simply switching between on and off (two states). For example, when we have got a button as a mode switcher - then we can add attribute type="button", and also the role="switch". Lots of things are going on here.

    Check it out => MDN.

    I am still not sure about the name="button". I think it is not necessary here.

    Thank you @FitItGuy. I have learned something thanks to you.

    Cheers :D

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 all CSS, SCSS and Less files in your repository.

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.

How does the JavaScript validation report work?

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

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

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

Oops! 😬

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

Log in with GitHub