Design comparison
Solution retrospective
Thank you for viewing my attempt at this challenge. I struggled the most with alternating the mobile and desktop background patterns, and centering my component properly within them. I'm wondering how others have managed to solve this problem. I welcome your feedback.
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.
DECORATIVE SVG'S āØļø:
- The
alt
attribute is used to provide alternative text for images in HTML documents. Thealt
attribute is used by screen readers to describe the image to visually impaired users, which is essential for web accessibility.
- Now, when it comes to decorative
SVGs
, they are used purely for aesthetic purposes and do not convey any important information or functionality to the user.
- Since these images do not convey any important information or functionality, there is no need for an
alt
attribute.
- So feel free to set the
alt
attribute as""
for decorativesvg's
, becausealt=""
will be skipped by screen readers they will consider the image as decoration
Example:
<img src="images/decorative.svg" alt="">
<img class="card__icon-music" src="images/icon-music.svg" alt="An icon of paired eighth notes"> š <img class="card__icon-music" src="images/icon-music.svg" alt="">
.
I hope you find this helpful š Above all, the solution you submitted is great !
Happy coding!
1@jasnoludekPosted over 1 year agoThank you @0xAbdulKhalid, that is very helpful information. I will be making this change. Happy coding to you as well!
0@0xabdulkhaliqPosted over 1 year ago@jasnoludek Glad you found it helpful ! š¤
0 - @Joshua-FarrPosted over 1 year ago
Why did you include this piece of code in your solution?
@media (prefers-reduced-motion: reduce) { html:focus-within { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }
1@jasnoludekPosted over 1 year agoThanks for your question @Joshua-Farr. Having just learned about CSS resets I've been trying to implement them in my code. In my last challenge I used Josh Comeau's, and so for this one I used Andy Bell's. It seemed to me that this particular piece of code wouldn't affect any part of this project, since there is no animation, but I chose not to omit it as an exercise in accessibility. I appreciate any suggestions on what to use/not use, or rather, how to make such decisions when using resets. Or, if/when CSS resets are best used. Thanks again!
0@0xabdulkhaliqPosted over 1 year agoHello @Joshua-Farr,
- That piece of code is used to stop the animations on the page manually, the prefers reduced motion is an option which can available on every device to stop animations
- If your device is low-end or you just wanna stop them for your personal preference then you can enable it
- After you enable it then the condition in implied on browser so that the website can also detect the condition for stopping the animation
- In short; it is used to stop or allow animations occuring on a website
- Hope my thoughts helpful to you!
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