envato / envato-theme-check

The WordPress Theme Check plugin for Envato
GNU General Public License v2.0
208 stars 57 forks source link

Empty alt attribute on an image is a VALID use case #66

Closed andrejcremoznik closed 3 years ago

andrejcremoznik commented 3 years ago

Copy-paste from MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Img

Omitting alt altogether indicates that the image is a key part of the content and no textual equivalent is available. Setting this attribute to an empty string (alt="") indicates that this image is not a key part of the content (it’s decoration or a tracking pixel), and that non-visual browsers may omit it from rendering. Visual browsers will also hide the broken image icon if the alt is empty and the image failed to display.

Empty alt alt="" is currently marked as a REQUIRED item to fix. This in unacceptable.

scottparry commented 3 years ago

https://github.com/envato/envato-theme-check/commit/d8cff343c84d66d8cda8b6e16cf47cd4442774b8