kapt-labs / django-check-seo

Django Check SEO will check the SEO aspects of your site for you, and will provide advice in case of problems. Compatible with Django & Django-CMS!
GNU General Public License v3.0
154 stars 12 forks source link

Treat missing alt attributes as Warning instead of Problem #48

Closed adrien-delhorme closed 2 years ago

adrien-delhorme commented 2 years ago

Describe the bug An <img> missing an alt attribute is filed as Problem.

According to WCAG, some images must not have alt attributes:

Sometimes there is non-text content that really is not meant to be seen or understood by the user. Transparent images used to move text over on a page; an invisible image that is used to track usage statistics; and a swirl in the corner that conveys no information but just fills up a blank space to create an aesthetic effect are all examples of this. Putting alternative text on such items just distracts people using screen readers from the content on the page. Not marking the content in any way, though, leaves users guessing what the non-text content is and what information they may have missed (even though they have not missed anything in reality). This type of non-text content, therefore, is marked or implemented in a way that assistive technologies (AT) will ignore it and not present anything to the user.

Expected behavior File missing alt attributes as warnings and explain why and how to fill alt attributes. Quotes and links to WCAG (and the RGAA french equivalent) should be present.