Mobile First Article Preview (HTML, CSS, Vanilla Javascript)
Design comparison
Solution retrospective
This one was a bit complicated, fiddled a bit with position:absolute and had to make some test to make it sure I didn't break anything. I enjoyed using different methods to acess html elements with javascript, but decided to stick with the good old querySelector. Any feedback is appreciated!
Community feedback
- @dwhensonPosted over 3 years ago
hi @ GaldinoMat š
Great work on this one! š your solution responds well at different sizes and looks great. Here's some suggestions you might like to consider:
-
Seems there's an issue with the icon links. I'm not expert here, but I think this article might help - I'm about to re-read it too! https://a11y-101.com/development/icons-and-links - Check the part on visual but accessible icons
-
On the button you have
aria-label="undefined"
- is there a good reason for this? If not perhaps we could replace 'undefined` with some useful text like "Share"? I think this would be more useful to screen readers -
On the same button, I saw you included the
onclick=toggleSocialBar()
in the HTML this is generally not such a good idea, better to keep the JS separate. This could be done thoughaddEventListener
on the button, or a similar approach.
He's a response from StackOverflow that sets out why this would be better: https://stackoverflow.com/questions/5871640/why-is-using-onclick-in-html-a-bad-practice not such a big deal when there's just a little bit of JS, but a good habit to get into.
But great going on this one! š I battled for ages to try and get the image working properly and yours looks great!
Cheers
2@GaldinoMatPosted over 3 years ago@dwhenson Hey man, thanks for the reply! I've been having some difficulties on understanding the <a> anchor issues, since this is the first time I've encountered it, but the site gives a excellent explanartion on how to improve one's webpage regarding accessbility. Also this is the first time I've ever dealt with the aria-label, so I didn't know what do to so aria-"undefined" seemed like a workaround. Now that I know what it does, I'll pay more attention in the future. Thank you very much for the feedback, this article/website and a very good source and is definetly going in my bookmarks!
1@dwhensonPosted over 3 years ago@GaldinoMat happy to have helped! Aria is tricky. I am just trying to improve my understanding of it one attribute at a time! Cheers
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