Vanza Setia• 27,795
@vanzasetia
Posted
Hi, Haroon!
I have some feedback on improving this solution.
- Not every image needs alternative text. Decorative images should not have alternative text (
alt=""
). This will tell the screen reader to skip over the image. As a result, it saves screen reader users time navigating the page. - For your information, decorative images are images that don't add any information and serve only aesthetic purposes.
<button>
element must always havetype
attribute to prevent unexpected behavior. Source: Checklist - The A11Y Project #use-the-button-element-for-buttons- Alternative text for the avatar should be only the person's name.
- Never start an alternative with "Photo of" or "Image of". The
<img>
semantic meaning is already enough to tell users that it is an image. <input>
must have an accessible name or label. In this case, you can usearia-label
to provide a label to the<input>
elements. Learn about "accessible name" — What is an accessible name? - TPGi- Add
rel="noopener"
to all links withtarget="_blank"
. It helps protect users of legacy browsers from security issues. Read more — Links to cross-origin destinations are unsafe
I hope my feedback helps. Happy new year!
Marked as helpful
1
Haroon Mustafa• 80
@haroon-raja
Posted
@vanzasetia Thank you so much Vanza Setia for your valuable feedback I'll definitely look at it and try to improve my code. Happy new year!
1