Blog preview card using variable fonts
Design comparison
Solution retrospective
I'm proud of getting back into Frontend Mentor challenges as I've been away for many months. I aim to dedicate more time into learning outside of work.
What challenges did you encounter, and how did you overcome them?The challenge I've encountered is on how to use more meaningful semantics for the element.
Referencing the MDN website, I've learnt that I could use the datetime attribute of a element to describe the publication date and time of an element.
Community feedback
- @grace-snowPosted about 1 month ago
You need to switch that aria-desciribedby to
aria-labelledby
. Using description means the blog heading is read out after everything repeatedly.The other small issues I noted
- this card would never be used to serve the main heading on a page. So you know it shouldn't have a h1. Use a lower importance heading level like h2 instead.
- you don't need aria hidden on decorative images. You have correctly left the alt empty so it's already been hidden in the right way.
- the description on the author image is only repeating the text that's next to it, leading to unnecessary screen reader announcement. It's bringing no value so treat that image as decorative too with an empty alt.
- font size should always be in rem not px. See https://fedmentor.dev/posts/font-size-px/
- I strongly recommend you stop using all these complex direct child css selectors. On a big project that will create css with high specifity that's very difficult to maintain. Keep css specificity as low as possible. Use single class selectors.
- note when links open in a new tab like in that attribution link it's best practice to let screen reader users know in advance. E.g. include some visually hidden text in a span that says "(opens in a new tab)".
- the design indicates that this whole card should be clickable. See if you can work out how to do that in a simple way without moving the link (it's in the correct place in the html at the moment - I could say exactly how but you may learn better trying to sort this one on your own first, maybe you just forgot to implement etc)
Marked as helpful0@MilleusPosted about 1 month ago@grace-snow Got it! Thanks for taking the time to review and share your feedback.
I'll fix these issues and apply these insights in future challenges. Much appreciated!
0
Please log in to post a comment
Log in with GitHubJoin 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