Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

NFT Preview Card

P

@dboca93

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hey there !

If anyone could please provide some feedback, I would really appreciate it :) I believe I've taken account of all the previous feedback I received for this challenge, however I did find the ARIA labelling a little confusing -- would love to know if I did this properly !?

The slideout footer at the bottom is meant only as a reference point for people to contact me personally. Let me know if this is inappropriate on front-end mentor.

Regards, Dilhan Boca

Community feedback

PhoenixDev22 16,990

@PhoenixDev22

Posted

Hi Dilhan Boca,

Congratulation on finishing this challenge. Great job on this one! I have few suggestions regarding your solution:

HTML

  • Page should contain <h1> . The <h1> is most commonly used to mark up a web page title. This challenge is supposed to be one component of a web page. To tackle the accessibility issue in the report , you may use an <h1> visually hidden with class=”sr-only”. You can find it here. Then you can use <h2> instead of <h3> as it's recommended use the headers in a chronological order.
  • The most important part in this challenge interactive elements. Since there's a :hover state on the image and means it's interactive, So there should be an interactive element around it. When you create a component that could be interacted with a user , always remember to include interactive elements like(button, textarea,input, ..) for this imagine what would happen when you click on the image, there are two possible ways: 1: If clicking the image would show a popup where the user can see the full NFT, here you use <button>. 2:If clicking the image would navigate the user to another page to see the NFT, here you can use <a>.

You should have used <a> to wrap Equilibrium #3429 and Jules Wyvern too.

  • The link wrapping the equilibrium image should either have Sr-only text, an aria-label or alt text that says where that link takes you.
  • The alternate text should not be hyphenated, it should be human readable. For any decorative images, each img tag should have empty alt="" and add aria-hidden="true" attributes to make all web assistive technologies such as screen reader ignore those images in icon-view, icon-clock, icon-ethereum.

The icon view does not really need to be in the HTML. You can use CSS for it.

Profile images like that avatar are valuable content. The alternate text should not be selfie.You can use the creator's name Jules Wyvern. Read more how to write an alt text .

The social links wrapping the icons should have aria-label (as you did )or sr-only text indicate where the link will take the user. Then you set aria-hidden =”true” to the icons to be removed from the accessibility tree and ignored by assistive technology .

Hopefully this feedback helps.

Marked as helpful

1

P

@dboca93

Posted

@PhoenixDev22 Thanks so much for your feedback, I've learnt a lot from it ! :)

1
PhoenixDev22 16,990

@PhoenixDev22

Posted

@dboca93 Glad to help. Happy coding!

0
P

@dboca93

Posted

@PhoenixDev22 Hey there, I believe I've addressed the issues from the previous comments -- if you could take a quick look to make sure I'm on the right track -- I would really appreciate it :)

Sincere thanks, Dilhan Boca

0
Vanza Setia 27,855

@vanzasetia

Posted

Hi, Dilhan! 👋

Congratulations on finishing this challenge! 👏

I notice this solution from your tweet. You already got some incredible feedback from Grace and PhoenixDev22. I recommend following them, especially Grace's comment about div elements inside the footer. My suggestion is to make the HTML structure something like this.

<footer>
  <div class="container">
    Links go here...
  </div>
</footer>

The .container is used to limit the width of the content inside the footer. It prevents the content from filling the entire horizontal space by setting a max-width. Then, you can use margin: 0 auto to horizontally center the content. After that, make it a flex container to align those social media icons.

Some more suggestions:

I suggest visiting the Solid Start website. It will give you a general overview of web accessibility.

I hope this helps! Happy coding!

Marked as helpful

0

P

@dboca93

Posted

@vanzasetia Thanks so much for your feedback, I've learnt a lot from it.

I will make some changes based on your advice soon ! :)

0
Vanza Setia 27,855

@vanzasetia

Posted

@dboca93 You are welcome!

0
P

@dboca93

Posted

@vanzasetia Hey there, I believe I've addressed the issues from the previous comments -- if you could take a quick look to make sure I'm on the right track -- I would really appreciate it :)

Sincere thanks, Dilhan Boca

0
Vanza Setia 27,855

@vanzasetia

Posted

@dboca93

I don't think the site needs a visually hidden h1. You can make the "Equilibrium #3429" as h1. It is much better to have visible h1.

Also, It is not valid HTML to make h2 a child element of an anchor tag (a). So, make the h2 as the parent element of the anchor tag instead.

For the label of the social media links, I recommend removing the word "Profile". This way, the screen readers won't create a lot of noise.

Other than those things, everything seems okay to me. Keep up the good work!

Marked as helpful

0
P

@dboca93

Posted

@vanzasetia Thanks so much for your reply, I appreciate it greatly.

It has really helped me :)

1
P
Grace 27,950

@grace-snow

Posted

I'm afraid you've not used any interactive elements on this at all. If a hover style is present, that indicates something should be clickable. This is inaccessible though because nothing here is clickable.

It's a really important principle to grasp that you need to carefully think about the most appropriate html elements to translate the content from the design into code.

The other thing you need to think more carefully about is alt text. Decorative images, such as the icons should have alt left intentionally blank. Meaningful images should have a proper description - eg the person's face should say their name at least. Images inside interactive elements should either

  • have alt left blank and the interactive element itself accessibly labelled (eg with aria-label) saying what clicking the element will do / where a link would go
  • OR the alt on the image should say what clicking the element will do / where a link would go
1

P
Grace 27,950

@grace-snow

Posted

Another thing I don't understand here is why you have empty divs in the html (see footer - totally unnecessary and bloats the html). And why you have additional nesting in the card. There is no reason to have an outer card and inner card div.

Try to keep html as simple as possible. If you are ever tempted to add extra layers in or empty elements, stop and try to think of an alternative

Marked as helpful

1
P

@dboca93

Posted

@grace-snow Thanks so much for your feedback, I've learnt a lot from it.

I will make some changes based on your advice soon ! :)

0

Please log in to post a comment

Log in with GitHub
Discord logo

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