Img Alt Text is Used for Both Web and Image Search
Google treats the text in an image alt attribute as part of the page for web search, as well as information about the image itself, for image search.
Image Alt Text Should Only Describe What’s Shown in the Image
Image alt text should focus on what’s shown in the image and not include other associated keywords which are not relevant to the image.
Use Alt Tags as Anchor Text when Linking with Images
When using links within images, make sure the alt attribute is being used in order to provide the anchor text that you want associated with the link.
Google Uses Alt Attribute as Part of Anchor For Linked Images
For linked images, Google sees the alt attribute as a descriptive part of the page it is on, but it is also used as part of the anchor for the page the image is linking to.
Alt Text Helps Google Understand Pages Beyond Image Search
Text in the alt attribute of images is seen as text on the page and can help Google better understand the page a little bit better beyond image search. However, the text in the alt attribute will likely be somewhere on the page anyway.
Check Alt Text is Present on Mobile Version of Images
John recommends checking that the alt text is present for the mobile version of images for mobile-first indexing. This is something Google has seen missing from sites that serve different content on mobile.
Data-alt Attributes Have No Impact on Image Search or Regular Search
With regard to images, data-alt attributes are used more for lazy-loading and giving other information for images from scripts, but this isn’t used for indexing in any way.
Linked Image Alt Text Acts as Anchor Text
Add alt text to image links as these act as anchor text, including on mobile pages.
Alt Text is Included as Part of the On-page Text
Alt text is shown when images are turned off in a browser and counts as part of the on-page text.