@VCarames
Posted
Hey there! 👋 Here are some suggestions to help improve your code:
- The image’s
alt tag
description needs to be improved upon ⚠️. Assume that you are describing the image to a someone over the phone.
More Info:📚
https://www.w3.org/WAI/tutorials/images/
- This component requires the use of two images 🎑 at different breakpoints ⚠️. The
picture
element will facilitate this.
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
- The only heading ⚠️ in this component, is the name of the perfume; “Gabrielle Essence Eau De Parfum” . The rest of the text should be wrapped in a
paragraph
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:📚
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding! 🎆🎊🪅
Marked as helpful
@jguleserian
Posted
@vcarames Thank you for the awesome feedback. I remember learning some of these concepts in the past, but I had forgotten about them. This is a great reminder.
With regard to your comment about making "Gabrielle Essence Eau De Parfum" the only heading element, I am curious about the reasoning for this. My thought was that the word "PERFUME" at the top of the card is a "type" or "category" of product and so needed more attention. Is the reasoning behind leaving it as a paragraph that a screen reader will announce it differently or out of order (since the "PERFUME" is a lower level heading) if not? Or, is it just considered a best practice since "Perfume" is not a subcategory of "Gabrielle..."?
I appreciate you taking time to look through my code and helping me make it better. I am also grateful for the links you provided.
Have a wonderful new year! Jeff
@jguleserian
Posted
@vcarames Thank you for the awesome feedback. I remember learning some of these concepts in the past, but I had forgotten about them. This is a great reminder.
With regard to your comment about making "Gabrielle Essence Eau De Parfum" the only heading element, I am curious about the reasoning for this. My thought was that the word "PERFUME" at the top of the card is a "type" or "category" of product and so needed more attention. Is the reasoning behind leaving it as a paragraph that a screen reader will announce it differently or out of order (since the "PERFUME" is a lower level heading) if not? Or, is it just considered a best practice since "Perfume" is not a subcategory of "Gabrielle..."?
I appreciate you taking time to look through my code and helping me make it better. I am also grateful for the links you provided.
Have a wonderful new year! Jeff
@VCarames
Posted
@jguleserian
Glad I could help! 😁 Happy New Year as well!
This component would be part of larger site. So the user would have already navigated to the "perfume" section of the site, so having the "perfume" as a heading makes no sense (Think Sephora or Macys).