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

Completed with ReactJS

P
Kevin Davis•280
@webdev1kev
A solution to the Article preview component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I have put the correct site link this time and made this more responsive. Any feedback on my media queries is appreciated.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Raymart Pamplona•16,040
    @pikapikamart
    Posted almost 4 years ago

    Hey awesome work on this one. Layout looks great in desktop, it is responsive but I find it weird that the image makes this funky sizes when screen-size changes, its kinda funny ( on my side hahaha), the mobile layout looks great as well.

    Agata already gave great feedback for this one, just going to add some suggestions as well:

    • Avoid using height: 100vh on a large container especially the body tag. This makes the element's height limited to the current remaining screen/viewport's height. Instead use min-height: 100v, this takes full height but lets your element expands if it needs to.
    • Always have a main element to wrap the main content of the page. This helps to organize properly your content and makes users to properly navigate your site.
    • Always have an h1 element on a page. For this one, the h1 would be better if it is a screen-reader only text, meaning it will be hidden using sr-only class, this will be inside the main element.
    • It would be great to add a p tag to wrap the text inside the header element.
    • Name of the person is great with heading tag, but your usage is incorrect. When using heading tag, if you use h4 make sure that h1, h2, h3 are present before it. Using heading tag level incrementally by 1.
    • The social media links should be using a tag for each link, and the whole social media links should be inside a ul element, since those are "list" of links.
    • Each a tag that wraps the social-media icon should have either aria-label attribute or an sr-only element inside the a tag, the value for whatever method should be the name of the social media it wraps. This way, users will know where this links would take them.
    • You should add aria-hidden="true"on the svg for each social media. Since they are only decoration, hiding them would be really great.

    Aside from those, great work again on this one.

    Marked as helpful
  • Agata Liberska•4,075
    @AgataLiberska
    Posted almost 4 years ago

    Hi Kevin, nice work!

    The only thing I noticed is that on really small screens, there is a gap between the image and the text-content - something caused by the grid rows.

    Also, it would be good if the clickable element was actually a <button>, with cursor set to pointer and some focus and hover styles. It would be good if you could add an aria-label as well, it's a good practice whenever links and buttons with no text content are used :)

    Hope this helps!

    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

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