Abdul Khaliq πβ’ 72,660
@0xabdulkhaliq
Posted
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 π·οΈ:
- 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.
Syntax:
<picture>
<source media="(min-width: xxx)" srcset="image-path">
<img src="default-image-path" alt="">
</picture>
- More Info π:
picture
element
- 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 π:
del
element
I hope you find it helpful π Above all, the solution you submitted is great !
Happy coding!
Marked as helpful
1
Eduardo S. Mesquitaβ’ 80
@Duzoka
Posted
@0xAbdulKhalid Hi! Thank you so much. Soon i'll solve all this problem. Thank more one time <3
0