sitespeedio / coach

Clear Eyes. Full Hearts. Can’t Lose.
MIT License
1.21k stars 64 forks source link

Coach reports empty alts as missing #253

Closed certainlyakey closed 4 years ago

certainlyakey commented 7 years ago

Currently the Coach hosted on sitespeed.io seems to report as an accessibility mistake empty image alts. 'Lacks alts' is not the same as 'has empty alts', which are totally fine from accessibility point of view.

arielger commented 7 years ago

+1

In some cases adding an empty alt tag is the best alternative (for example for decorative images or redundant alt content). There is more info in this post: http://webaim.org/techniques/alttext/

beenanner commented 7 years ago

Hmm I'm not sure what the alternative would be. I personally prefer what it is doing now which is a lower score on alt tags with known blank alt tags vs giving a false higher score with incorrect usage of alt tags. Both of the cases explained are situational and require some sort of context to determine their validity. Would it be possible to detect those examples programmatically?

onurozkan commented 7 years ago

I think right thing to do checking role="presentation" attribute for skipping decorative images.

https://www.w3.org/WAI/tutorials/images/decorative/