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

Article preview component

Kasia Zaleska•200
@kzaleskaa
A solution to the Article preview component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Please let me know if I made any mistakes or something I can improve. 👀

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Raymart Pamplona•16,040
    @pikapikamart
    Posted over 3 years ago

    Hey awesome work again on this one. Desktop layout looks nice, it is responsive and the mobile state looks great as well.

    Kamil Szymański already gave feedback on this one, just going to add some suggestions on this one as well:

    • To be honest, I wouldn't really use h1 on the bold text since it doesn't really look like a section heading that gives information on what those would contain, hence p tag would be fine. But since h1 will be removed, the h1 will only be a screen-reader only h1. Meaning this will be hidden for sighted users and only be visible for screen-reader users. The h1 text should describe what is the main content is all about, this h1 would be placed as the first text-content inside the main element.
    • Person's image should be using img tag itself and using the person's name as the alt like alt=""Michelle Appleton"
    • When wrapping a text-content do not just use span to wrap it, use meaningful element like a p tag if it just a regular text or heading tag if it is an heading.
    • The button toggle should have aria-expanded="false" as a default attribute and it will be set to true if the user toggles it and vice-versa.
    • Currently, the dropdown is not totally hidden. Using only opacity it only hides the element visually but it is still being picked up by screen-reader, add visiblity property to properly hide the element.
    • Social media links could be inside ul since those are "list" of links.
    • On the a tag that wraps the social media, lose the word "link" since a tag is already a link so no need to use it.
    • Each svg inside the social media link should be hidden since they are only decoration so use aria-hidden="true" attribute on them.

    Aside from those, site looks great.

    Marked as helpful
  • Kamil Szymański•140
    @szymKamil
    Posted over 3 years ago

    Nice coding, I'm currently finished this challenge too, but your script is arranged than mine. I'll borrow some ideas from you, line starting from mobile version, instead of computer size of web. I have only one sugesstion in JS coding. Instead of toggling on and off tooltip, try to set that clicking on button with arrow will display tooltip, and clicking outside button and tooltip will hide it. If you want, check my solution: https://github.com/szymKamil/FrontentMentorChallenge5

    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 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