When a user's avatar is not available, and they're listed in the Top Network Askers in the right sidebar of https://stackexchange.com/, the alt text of the avatar overlaps the username or site name in some browsers:
-
Well, tried to dig into it, the current design force a very small image, can't see a simple way to make room for alt text which isn't very short. I'm afraid this can be fixed only as part of a bigger design change of the page, or at least the Top Network Askers part of the page.– Shadow Wizard Love ZeldaJun 7, 2020 at 11:55
-
Related: Ugly scrollbar shown on HNQ when user image can't be shown– scohe001Jun 7, 2020 at 15:54
1 Answer
We're not supposed to have alt text on the avatars. It causes all sorts of issues in all sorts of browsing configurations, because that's not what alt text is for. Specifically, we should have alt=""
set on them. See the Web Accessibility Initiative guidance:
Decorative images don’t add information to the content of a page. For example, the information provided by the image might already be given using adjacent text, or the image might be included to make the website more visually attractive.
In these cases, a null (empty)
alt
text should be provided (alt=""
) so that they can be ignored by assistive technologies, such as screen readers.
User profile pages, and the hover cards, are a different case: people sometimes discuss profile pictures, so it would be nice to be able to provide alt text for that case. But that would be a feature-request.
"wizzwizz4's user avatar" is not acceptable in any case.