recoilme / tgram

typegram: open source publishing platform
http://tgr.am
GNU General Public License v3.0
335 stars 32 forks source link

alt tag on avatars removed #74

Open recoilme opened 6 years ago

recoilme commented 6 years ago

@Flameborn i removed alt tag on avatars images - it ruins interface is it critical?

Flameborn commented 6 years ago

No, it is not as important. I think the only time the alt tag can show up is if the image is empty.

Flameborn commented 6 years ago

More info about alt attributes here https://moz.com/learn/seo/alt-text

recoilme commented 6 years ago

thanks, we must hide empty images - it's bug

Flameborn commented 6 years ago

Sorry, I was under the assumption that empty images were not shown. This should be an easy fix.

uvNikita commented 6 years ago

Note that alt attribute of the image tag is important for web accessibility: https://webaim.org/techniques/alttext. The content of this attribute is read out loud when an assistive technology like screen reader is used. E.g. without this text, a screen reader will simply read non-descriptive "image".

When it comes to the article images, the best would be to have a detailed description of the image content (e.g. "A woman standing in front of the tree with the hands covering her face."), but having at least indication that the image belongs to an article, like it was implemented before the change (https://github.com/recoilme/tgram/commit/d24fb35540df7f6b308ccc237d2b317cb6eb0c55), would be better than nothing IMHO.

Flameborn commented 6 years ago

You are right, however, unfortunately, this is outside of Typegram's control, unless author avatars are automatically generated.

At the moment, I believe users can upload their own image, which could be anything. It should be the user's responsibility to tag their own image properly.

We should definitely indicate that there is an image on the page, via the alt attribute, but I think the issue here was that without an image, the alt text showed up.

The solution would be to revert the attribute removal and only display the link if the .Image field is not empty.

On a sidenote, when the image is displayed, there are two links pointing to an author's page, one image, and one text. Is this necessary?

recoilme commented 6 years ago

i have an issue for autogenerated avatars: https://github.com/recoilme/tgram/issues/32 i think it closes 2 issue with one shot