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 component using flexbox and utility classes

Shaun 180

@DevShaunB

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

T
Grace 29,310

@grace-snow

Posted

I think you're really close with this one! Most of the HTML and CSS is great, but there is one glaring issue to me...

That image has a cursor pointer and hover effect on it, which implies it should be clickable. Yet you've only used a div. Think through how to do that bit accessibly. That's the real challenge with accessibility here...

Also, when writing alt text, you shouldn't need to include words like "image". It's already an image role. That avatar image would currently be announced to screenreaders as "image, Jules Wyvern Avatar image".

Marked as helpful

1

Shaun 180

@DevShaunB

Posted

@grace-snow Thanks for the feedback.

I did think about making the image more accessible here. I can either use an anchor tag (assuming it will go to a different page), or I can use a button (assuming it will open a modal) instead of a div wrapper. I was also thinking about adding some sr-only visually hidden text to inform the user which card is focused (assuming an actual website will have a bunch of these cards).

Regarding the avatar image, will fix that right away.

0
T
Grace 29,310

@grace-snow

Posted

@DevShaunB I'm not sure why you'd need visually hidden text on this... Unless you mean for the button action perhaps? Maybe Im not understanding

0
Shaun 180

@DevShaunB

Posted

@grace-snow I updated it. I used an anchor tag with aria-label to wrap the image.

1

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