Article preview component – plain HTML/JS/CSS using BEM
Design comparison
Solution retrospective
Hey there 👋 This time around I tried something new for myself – applying the Block-Element-Modifier (BEM) methodology to organise styles. It was definitely challenging to figure out the HTML structure first and decide on blocks/elements.
If you have time to review my code, I'd love your feedback on using BEM and structuring my code. Thanks!
Community feedback
- @grace-snowPosted almost 4 years ago
Hi This is really good and your BEM looks great to me. We'll done, it's not easy to grasp at the start!
If you want to improve the accessibility, I'd recommend
- adding an Id to the share-box
- adding aria-controls to the share button, with a value of that ID
- Adding aria-expanded to the share button with an initial value of false
In js, on click you would then
- toggle aria-expanded to true
- toggle the text of the share buttons aria label value between "share" and "close share options" (or something like that)
I hope that all makes sense and is helpful to you. And again, well done on this 👍
3@itsfedorukPosted almost 4 years agothanks Grace, appreciate your review and tips – always so valuable! I updated my solution and will keep it in mind 🙌
0 - @ApplePieGiraffePosted almost 4 years ago
Hey there, Maria! 👋
Nice to see you complete another challenge! 😀 Well done on this one! 👍 I think your solution looks great and responds well (the social media popup works nicely, too)!
A super minor suggestion I might make may be to add a hover state to the social media links in the popup. 😉
Otherwise, keep coding (and happy coding, too)! 😁
1@itsfedorukPosted almost 4 years agothank you so much, appreciate your review! that's a good add-on – I included it now in my updated solution :)
1
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