@0xabdulkhalid
Posted
Hello there ๐. Congratulations on successfully completing the challenge! ๐
- I have a suggestion regarding your code that I believe will be of great interest to you.
MAKING ACCESSIBLE TESTIMONIALS :
- Currently the Testimonials are not accessible, i see you have used visually hidden headings for each testimonials but you stated them as card.
- Even though you hard coded those heading still the testimonials are not accessible because of the usage of non-semantic
div
element, Actually we need to use<figure>
and<blockquote>
elements to wrap the testimonials.
- For example:
<figure>
<figcaption>
<img src="./assets/images/image-daniel.jpg" alt="Daniel Clifford" />
<div>
<p>
<span class="sr-only">Testimony Author</span>
Daniel Clifford
</p>
<p>Verified Graduate</p>
</div>
</figcaption>
<blockquote>
<h2>
Testimonial Title
...
</h2>
<p>
Testimonial Quote
...
</p>
</blockquote>
</figure>
- Additionally, you want to add proper alt for
img
inside testimonials because they are not for decoration, It will help us to tell the user who is the author of the testimonial, its recommended to use the author's name as the alt attribute value likealt="Daniel Clifford"
instead of "Profile Picture".
- If you have any questions or need further clarification feel free to reach out to me.
.
I hope you find this helpful ๐ Above all, the solution you submitted is great !
Happy coding!
Marked as helpful
@DrakeHermit
Posted
@0xabdulkhalid Thanks a bunch for the advice, I'll make sure to think about the accessibility in the next projects I attempt. I never really thought about using figure in my HTML, that will help me quite a bit in the future.