QR-Code Challenge

Solution retrospective
---This is an updated version to create a better layout experience using the suggestions from my peers.
First challenge on Frontend Mentor. Feedback welcome as I know there are multiple ways this project could have been done and probably much better.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @vanzasetia
Hi, John! 👋
Congratulations on completing your first Frontend Mentor challenge! 🎉
You've gotten some awesome feedback especially on solving the issues that have been reported. I have some feedback as well.
- The alternative text of the QR code is not giving enough information. If you try a screenreader and then close your eyes, then the screenreader pronounces the image as "Frontend Mentor, image.". Then, what do you think the screenreader users would think about the image?
- Remove all
br
elements from the paragraph. Let lines wrap where they need to. Screen readers will read outbr
elements. You can't accommodate every screen size, so it's rare you'll ever need to use them. - Remove
width
andheight
from thebody
. Never use100vw
on anything as it doesn't account for scrollbars when present. It may only ever introduce potential overflow/scroll bugs.
That's it! I hope this helps. 😊
Marked as helpful - @Bayoumi-dev
Hey John, It looks good!... Here are some suggestions:
Document should have one main landmark
, Contain the component with<main>
.
<main class="container"> <div class="qr_code_card"> //... </div> </main>
-
Page should contain a level-one heading
, Change<p class="p1">
to<h1 class="heading">
You should always have oneh1
per page of the document... in this challenge, you will useh1
just to avoid theaccessibility issue
that appears in the challenge report... but don't useh1
on small components<h1>
should represent the main heading for the whole page, and for the best practice use only one<h1>
per page. -
You have used
grid
to center the component on the page, but you need to set the height of thecontainer
--->min-height: 100vh;
to center it at this height:
.container { display: grid; justify-content: center; align-items: center; /* width: 1440px; /* <---- Remove */ /* height: 800px; /* <---- Remove */ min-height: 100vh; /* <--- Add */ }
- Use
REM
for font size, It is a must for accessibility because px in some browsers doesn't resize when the browser settings are changed... See this article ---> CSS REM – What is REM in CSS?
Hope this help!... Keep coding👍
Marked as helpful - @vanmendez
Good job!! 👏 I have a couple of observations, if you don't mind:
- Use semantic tags instead of div's, for example the container can be a <main>
- Each web page must have an <h1> tag; if you decide to add more <h?> make sure to follow the ascending order of these I am starting in web development, in the tutorials that I have seen they indicate that we must avoid these errors. 😉
Marked as helpful
Join 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