Design comparison
Solution retrospective
This is my first time where using a mobile-first workflow worked out better for me than desktop-first. I started on desktop, but then nightmares occurred when trying to pare down to mobile. So I started from scratch with mobile and that became a breeze.
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
Hello there 👋. Congratulations on successfully completing the challenge! 🎉
- I have other recommendations regarding your code that I believe will be of great interest to you.
HEADINGS ⚠️:
- This solution consists incorrect usage of
<h1>
so it can cause severe accessibility errors due to lack of level-one headings<h1>
- You have added a
h1
but unfortunately you have addeddisplay: none
inline style to that.
- By adding
display: none
theh1
is completely hidden for both visual & visually impaired users. So the screen readers can't able to identify theh1
.
- Eventhough you added it, but it's potential is not been used instead of adding
display: none
you want to addsr-only
class which are set of style rules that made for screen reader only contents
- Here's the style rules for
sr-only
class
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
- And another thing is that we want to convey what page they are visiting so here the text
Choose Your Vehicle
can't define component itself, So you can better use Example:3-column preview card component
- If you have any questions or need further clarification, you can always check out
my submission
for this challenge where i used this technique and feel free to reach out to me.
.
I hope you find this helpful 😄 Above all, the solution you submitted is great !
Happy coding!
Marked as helpful0@kevinx9000Posted over 1 year ago@0xAbdulKhalid Thank you for your feedback! I had forgotten to come back to that
h1
issue. The reasoning behind it was that I felt the car categories ofSedans
,SUVS
, andLuxury
should be headings, but that it didn't make sense to make them allh1
since there should only be one of those on a page. So I felt the need to make them eachh2
, but then there wouldn't be anh1
on the page to lead from and I felt I would get an HTML issue/notification for that in my code. So in the end, it probably wasn't the smartest decision. But for the sake of building a component instead of an actual page (even though it's built and submitted as a full web page), I should probably simply remove theh1
code entirely and keep theh2
tags as is, since it is just a component and not a functional web page anyway. Thank you again for taking a look and for your feedback!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