mosra / m.css

A no-nonsense, no-JavaScript CSS framework, site and documentation theme for content-oriented websites
https://mcss.mosra.cz
Other
406 stars 92 forks source link

M_SITE_LOGO: image should have alternative text #135

Closed lpirl closed 4 years ago

lpirl commented 4 years ago

base.html generates an img tag without an alt attribute. However, the w3c requires images to have alternative texts. If we don't want to introduce a new configuration option, we could at least set the alternative text to "logo of SITENAME" or similar.

mosra commented 4 years ago

Good idea. I searched around a bit (1. 2) and decided on providing an empty alt (alt=""). Standards or validity aside, from the accessibility PoV the logo is non-essential, so saying "logo of SITENAME" is just noise, especially when SITENAME is repeated right after. From what I understood, omitting the alt altogether conveys the meaning of "we didn't bother with accessibility", so an empty alt suggests that "we care about accessibility but this image is not important, ignore it".

Pushed as 76f5921f35f35db62574da16d019dce4e9b7ca41, updating all three themes.

lpirl commented 4 years ago

Great! Thanks for the instant and considered improvement.