Design comparison
Solution retrospective
- How to properly set the box illustration on the card?
- Why 'this' is not working?
Community feedback
- @vanzasetiaPosted about 2 years ago
Hi, John! 👋
For the box image on the desktop layout, you can use either pseudo-element or an
img
tag with empty alternative text (alt=""
). Then, you can try absolute positioning the box. I recommend not using percentage units. I recommend usingrem
instead.Here are some suggestions for improvements.
- I recommend using
details
andsummary
tags to create the accordion. Currently, there's no way for the screen reader to know whether the accordion is opened or closed. Also, since it is not an interactive element, it can't be accessed using the keyboard. - I suggest not styling the
html
element. Usebody
element to set up general styling for the page.html
element can overwrite the user's setting so it's best to not style anything in it.
I recommend visiting the Solid Start website to know an overview of web accessibility.
I also have three recommended videos. The first one tells how hard HTML is (HTML is not easy). The other two talk about modern CSS techniques and approaches.
- Manuel Matuzović - Lost in Translation - YouTube
- Andy Bell – Be the browser’s mentor, not its micromanager - YouTube
- Stephanie Eeckles - Scaling CSS Layout Beyond Pixels - YouTube
I hope this helps! Happy coding!
Marked as helpful0@loifloroPosted about 2 years ago@vanzasetia thank you for your insightful comment. how about the 'this' on Javascript file? Unfortunately, it's not working.
0@vanzasetiaPosted about 2 years ago@loifloro You're welcome!
I don't see any
this
keyword in theapp.js
. So, I don't know about the issue. I recommend trying to replicate the issue on the live site. This way, I can know about the issue.Maybe the MDN documentation for the
this
keyword can help you.0@vanzasetiaPosted about 2 years ago@loifloro Also put the
script
tag above the closingbody
tag.0 - I recommend using
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