@VCarames
Posted
Hey there! π Here are some suggestions to help improve your code:
Love the animation, but unfortunately your content is not accessible.
- Since the images in this component adds value and serve a purpose (displaying the product) it needs to be accessible. The image needs to be applied using the
picture
element and not thebackground-image
property, as it will not only let you use different images during different breakpoints it will let apply analt tag
description to image stating what the image is.
Here is an example of how it works: EXAMPLE
Syntax:
<picture>
<source media="(min-width: )" srcset="">
<img src="" alt="">
</picture>
More Info:π
https://www.w3schools.com/html/html_images_picture.asp
- Currently, the old price (169.99) π· is not being properly announced to screen readers. To fix this, you are going to wrap the the price in a
del
element and inside it you will add aspan
element with ansr-only class
that will state something like βThe previous price wasβ¦β and use CSS to make it only visible to screen readers.
More Info:π
- The "shopping cart" icon π is decorative, so its
alt tag
should left blank and have an aria-hidden=βtrueβ to hides it from assistive technology.
- Implement a Mobile First approach π± > π₯
With mobile devices being the predominant way that people view websites/content. It is more crucial than ever to ensure that your website/content looks presentable on all mobile devices. To achieve this, you start building your website/content for smaller screen first and then adjust your content for larger screens.
More Info:π
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding!ππ
Marked as helpful
@0xabdulkhalid
Posted
@vcarames
I really put a lot of thought into this, thank you for noticing.
I resolved that issue, do consider reviewing my solution once again to find any other issues
@VCarames
Posted
@0xAbdulKhalid
For this challenge, only one source
is needed inside the picture
element.
Your image needs an alt tag
. Inside the alt tag should describe what the image is; they need to be readable. Assume youβre describing the image to someone.