Design comparison
Solution retrospective
🫡 Hello, Frontend Mentor Army. This is my solution for the QR-Code Card Component
Another great Challenge by Front-End #LearningByDoing
I added some features:
-🎨 A little bit of color customization -🧚♂️ Heading hover color change -👨💻 Card hover shadow
Need to learn
-Responsiveness: I still Can't figure out how to make it responsive 😅
I'll be happy to hear any feedback and advice!
Community feedback
- @AdrianoEscarabotePosted almost 2 years ago
Hi Devesh shukla, how are you? I really liked the result of your project, but I have some tips that I think you will enjoy:
You have used <br> , using <br> is not only bad practice, it is problematic for people who navigate with the aid of screen reading technology. Screen readers may announce the presence of the element. This can be a confusing and frustrating experience for the person using the screen reader. You can read more in MDN.
To align some content in the center of the screen, always prefer to use
display: flex;
it will make the layout more responsive!Example:
body { margin: 0; padding: 0; display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 100vh; }
The rest is great!
I hope it helps... 👍
Marked as helpful2@deveshshuklaPosted almost 2 years ago@AdrianoEscarabote Thanxs brother for sharing useful tips... I will remember these points 🤗
1 - @vanzasetiaPosted almost 2 years ago
Hi, Dev Shukla!
I don't recommend adding a hover effect on the heading. The users might expect that those are links or any other interactive elements. It can be confusing when it doesn't do anything. Also, the heading (
<span class="heading">
) should be ah1
.Some suggestions about alternative text:
- It should not be hyphenated like code or class name. It should be human-readable.
- It should not contain any words that are related to "image" (e.g. picture, photo, logo, icon, graphic, avatar, etc). It is already an image element (
img
) so the screen reader will pronounce it as an image. - It should describe what will happen after the users scan the QR code.
- An example of the QR code alternative text, "QR code to frontendmentor.io".
Remove all
br
elements. Screen readers may read outbr
elements as "break" and not read the content withinbr
s. Let lines wrap where they need to. Learn more about the issue by visiting the MDN documentation page forbr
.<br>: The Line Break element - HTML: HyperText Markup Language | MDN #accessibility_concerns
Avoid using
px
unit for font sizes. Userem
orem
instead. Relative units such asrem
andem
can adapt when the users change the browser's font size setting.The Surprising Truth About Pixels and Accessibility: should I use pixels or rems?
I hope this helps. Happy coding!
Marked as helpful2@deveshshuklaPosted almost 2 years ago@vanzasetia Thanxs brother for sharing useful tips... I will remember these points 🤗
1
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