Design comparison
Solution retrospective
Hello, I just completed the QR code component challenge. I have a few questions.
-
I set the 'main' container width to 350px instead of using min/max width, is it okay to do that?
-
is it okay to also upload the fonts and images i used in the code to github? if not, please specify other ways i can use them
-
how do i go about that rule of "Page should contain a level-one heading"?
-
does my code follow best practices? what are the best practices?
Any additional feedback will be duly appreciated.
Thanks.
- Stanmancer (►__◄)
Community feedback
- @ohuttarPosted over 1 year ago
"Page should contain a level-one heading" just means you need an h1.
It's recommended to include an h1 for the sake of accessibility. Using semantic HTML helps visually impaired users easily follow the page's contents. For example it could be confusing to hear that there's a secondary-level heading when they haven't heard a main heading.
One solution would be to change your h2 heading to an h1. Another would be to make an h1, and style it to be hidden visually (so it can be read by a screen reader, but not interfere with the visual style).
Marked as helpful2@StanmancerPosted over 1 year ago@ohuttar Thanks for your feedback. I have made corrections to my code. I used h1 heading instead of an h2 and used a font size of 22px.
1 - @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.
HTML HEADINGS 🏷️:
- This solution generates accessibility error reports due to lack of level-one heading
<h1>
- Every site must want at least one
h1
element identifying and describing the main content of the page.
- An
h1
heading provides an important navigation point for users of assistive technologies, allowing them to easily find the main content of the page.
- So we want to add a level-one heading to improve accessibility by reading aloud the heading by screen readers, you can achieve this by adding a
sr-only
class to hide it from visual users (it will be useful for visually impaired users)
I hope you find it helpful ! 😄 Above all, the solution you submitted is great
Happy coding!
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