@MelvinAguilar
Posted
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
HTML π·οΈ:
- In my humble opinion, the tag
<picture>
is a very good choice when switching between images.
-
Avoid using uppercase text in your HTML because screen readers will read it letter by letter. You can use the
text-transform
property to transform the text to uppercase in CSS.The word "perfume" is written as separate letters, which does not convey the meaning that this text is a single cohesive unit of content. This can be confusing for users and for screen readers, as it can be difficult to understand the meaning of the text.
Example:
<p>Perfume</p> p { text-transform: uppercase; letter-spacing: 0.3em; }
Alt text π·:
- The
alt
attribute should not contain the words "image", "photo", or "picture", because the image tag already conveys that information.
-
Not all images should have alt text. The cart-icon is a decorative image, it does not add any information to the page. You should use an empty
alt
attribute instead of a descriptive one. You can read more about this here π.If you want to learn more about the
alt
attribute, you can read this article. π.
CSS π¨:.
-
Use
min-height: 100vh
instead ofheight
. Setting the height to 100vh may result in the component being cut off on smaller screens, such as a mobile phone in landscape orientation.
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful
@KoiHast
Posted
@MelvinAguilar Thank you so much for the feedback! I was also kinda confused when the accessibility report said I needed to add a descriptive alt attribute to the cart icon.
And that totally makes sense about not having "photo" in your alt tag. That was goofy of me. I should've caught that.
I didn't know that screen readers read capital letters as the actual letter names. I'll make sure to keep that in mind for the future!