Abdul Khaliq 🚀• 72,660
@0xabdulkhaliq
Posted
Hello there 👋. Congratulations on successfully completing your fourth challenge! 🎉
- I have other recommendations regarding your code that I believe will be of great interest to you.
HTML 🏷️:
- The solution generates accessibility error reports due to skipping heading levels
- We want to avoid skipping heading levels, make sure to start with
<h1>
and working your way down the heading levels (<h2>
,<h3>
, etc.) helps ensure that your document has a clear and consistent hierarchy. Source 📘
- Because skipping heading levels is a poor practice from the perspective of information design, whether we are talking about web pages, books, journal articles, or about anything else. You can not only confuse screen readers but all readers when you don't follow a consistent, logical pattern with your heading structure.
Alt text 📷:
- The
alt
attribute should not contain underscores or hyphens, it must be human readable and understandable.
- 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<img src="images/icon-star.svg">
is a decorative image, it does not add any information to the page. You should use an emptyalt
attribute instead of a descriptive one. You can read more about this here 📘.
- Eg:
<img src="images/icon-star.svg" alt="">
- If you want to learn more about the alt attribute, you can read this article 📘.
I hope you find it helpful 😄 Above all, the solution you submitted is great !
Happy coding!
Marked as helpful
0
Nnanna• 50
@Nnanna777
Posted
@0xAbdulKhalid So if I have a h1 as a heading and the next heading looks like a h5 because it's a lot smaller.
So I shouldn't use the h5? and use a h2 or something else
0