The HTML5 specification requires conformance checkers to report the lack of an
alt attribute as an error, except in certain cases; for details, see the Guidance for conformance checkers subsection of the Requirements for providing text to act as an alternative for images section of the spec.
The preferred means for marking up a text alternative for an
img element is to use the
alt attribute to provide a full equivalent for the image, or to provide an
alt attribute with an empty value (to indicate that the image is purely presentational).
To provide suitable text alternatives for images, you should consult detailed guidance such as the document HTML5: Techniques for providing useful text alternatives or the Requirements for providing text to act as an alternative for images section of the HTML5 specification.