Alt text (alternative text) is a text that appears in place of an image on a webpage if the image fails to load on a user's screen.
This text also helps screen-reading tools describe images to visually impaired readers and allows search engines to better crawl and rank your website.
Screen-reader technology will announce the alt text that it sees and, in most cases, visual elements will not need to be described to them
The Web Content Accessibility Guidelines (WCAG) were introduced in 1999 and outline the goals for developing websites for visitors who have certain disabilities. These guidelines state that authors should "provide equivalent alternatives to auditory and visual content."
One important thing to remember is that not all images require alt text. Images or icons that do not have any relation to the site and are purely visual in nature should keep their alt text empty. Refer to this article for some of the best practices in writing good alt text.
Alt text allows a user with a screen-reader or other assistive technology to understand the purpose of the image without seeing it. In other words, it helps ensure your visual content is accessible to all users, including those with visual impairments.