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

NFT-Card-Preview Component using css Grid and FlexBox

accessibility
Shikur•140
@shikurassefa
A solution to the NFT preview card component 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?

to be honest i have nothing to proud of in view of the fact that the projects which i developed until now is straightforward.

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

you know! when i commenced my coding i had a trouble of website accessebility, but from time to time i overcome it.

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

as i declare at the top the project is straightforward so there is no such things that i require an assist.

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

    I'm afraid this has lots of problems currently.

    • it's unreadable for me due to poor colour contrasts that aren't like the design. I'll add an image to discord so you can see what I see.
    • all content should be contained within landmarks. This component belongs inside a main landmark. It does not have a header. It's just one card that would go inside main, it's not a full Web page.
    • the image has a hover style in the design. That tells you it needs to be wrapped in an interactive element like a link or button (which one you choose depends on what you think would happen on click of it). That element will need an accessible name to make clear what the action of that button does or where the link goes.
    • the heading also has a hover style so needs a link in there.
    • those icons are decorative and you've correctly left their alt blank. But that means it makes no sense to use figure and figcaption. You can't have a caption to no content and when an image is decorative its like no content. The price and time left are just paragraphs.
    • similarly the bottom of the card doesn't make sense as a figure either.
    • the author name is meant to be a link, not the text before it.
    • to make the main image hover work once you've updated the html have a look at the tutorial post I've written on the resources channel on discord.
    • in the styles get into the habit of including a full modern css reset at the start of the styles in every project you do. Look up Andy Bell's modern css reset.
    • it's really important you don't limit the height of elements that contain text, including the body. Instead of height 100vh, use min-height instead so it is allowed to be taller than the viewport when necessary (like on landscape orientation phones).
    • this component mustn't have a width either. It can have a width 100% but not a fixed width. Use max-width in rem units instead. This is another important distinction. Using max width allows the card to be narrower if it ever needs to be, and using rem units means the layout will work even when users change their default text size.
    • it's very bad to Increase css speed as you're doing with these complex css selectors. The styles will become extremely difficult to maintain on larger projects writing styles like this. Keep css specificity as low/flat as possible and stick to single class selectors as much as possible. For example, use .view instead of main .view.
    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, SASS, 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.

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