The discussion revolves around the missing alt attribute in avatar image tags, which triggers validation errors. Alexander_Wright noticed the issue while validating the site’s source, highlighting that images without alt attributes must not have aria-* attributes unless aria-hidden is used. simon questions whether the current aria-label is sufficient for screen readers. awesomerobot confirms the issue is with topic list avatars and suggests using alt instead of aria-label for broader compatibility and validity. JoshuaH proposes filling the alt attribute with the same text as the title attribute for SEO benefits, but notes the challenge of modifying the Handlebars template to include this.
I’m curious if the current markup will cause an issue for screenreaders, or if they will pull in the needed information from the avatar’s aria-label tag?
It looks like adding alt="" to the image would remove the error message from the validator.
The latest screen readers will read the aria-label, which I think is our intention there. We should use alt instead of aria-label though, because that will cover older screen readers and be technically valid.
For SEO, especially Google, it will be very welcoming if the alt attribute for the avatars could be filled with the same text that is now used for the title attribute.
Is it somehow possible to do this myself?
I’m trying to do it like this and edit the {{avatar poster avatarTemplatePath="user.avatar_template" usernamePath="user.username" namePath="user.name" imageSize="small"}}: