Smf2.1: Avatar image alt contains member login

Created on 1 Mar 2019  路  8Comments  路  Source: SimpleMachines/SMF2.1

Avatar image looks like
<img class="avatar" src="https://..." alt="avatar_**login**">

Avatar image alt contains member login. Wouldn't it have been better to insert displayed username here?
<img class="avatar" src="https://..." alt="avatar_**displayed_name**">

Avatars

All 8 comments

huh interesting, I never noticed, the alt value contains the user's username which anyone can see even if they don't have permission to.

Displayed names can contain spaces, etc. This could be charged to the member's ID number instead.

I thought we had already changed the avatar alt to not show anything. Screenreaders can already see the name of the user, they do not need to see it twice in the form of "avatar of user".

Can you double check that, @Gwenwyfar? If so, we can close this.

I guess it was discussed but we forgot to make the changes.

This other one also needs an empty alt, instead of none:

https://github.com/SimpleMachines/SMF2.1/blob/7d6b4d0c5d94c0e1147e711515826dde8f977940/Sources/Load.php#L3639

Displayed names can contain spaces, etc. This could be charged to the member's ID number instead.

And just to comment on this: Alts can (and should) have spaces. They are just a description of the image. So if we were to keep it, a proper one would be "Avatar of username" or "username's avatar" instead of "avatar_username"

Derp. I must have been thinking about class names, not alt text.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

albertlast picture albertlast  路  10Comments

sbulen picture sbulen  路  6Comments

VBGAMER45 picture VBGAMER45  路  4Comments

Dzonny picture Dzonny  路  9Comments

KarelWintersky picture KarelWintersky  路  5Comments