Why it matters
- A screen reader reads the alt text in place of the image. «IMG_2045.jpg» or «صورة» tells a blind visitor nothing about it, and a visitor with images switched off or a slow connection sees the same.
- A search engine uses the alt text to understand what an image shows and what it is about, so a file name wastes the one line it gives you for that.
- A screen reader already announces that something is an image: «image of…» and «صورة لـ…» make it say so twice.
Example
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACw=" width="1" height="1" alt="IMG_2045.jpg" />
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACw=" width="1" height="1" alt="زجاجة عطر العود الملكي بحجم 50 مل" />
How to fix
Describe what the image shows, in the page's language and in the words a person would use:
html
<img src="/img/royal-oud.jpg" alt="زجاجة عطر العود الملكي بحجم 50 مل" />- Say what matters about the image in its place on the page: the product, the person, what the chart shows.
- Leave
alt=""(empty, not missing) on an image that only decorates; a screen reader then skips it. - Do not start with «صورة» or "image of".
- On a platform, fill the image's alt text field when you upload it; many themes copy the file name into it when it is empty.
How we detect
- We read the
alttext of the images, image areas and image buttons in the page's HTML (the first and last 100 or so of the page). filename: it ends in an image extension, or begins withIMG,DSC,photo,screenshotand the like followed by a number.generic: it is only one of: image, photo, picture, graphic, banner, logo, icon, صورة, شعار, أيقونة.prefix: it begins with "image of", "photo of", «صورة لـ», «صورة عن» or «لقطة لـ» followed by something.- One finding for each kind, with how many and the first. A missing
altis for the accessibility checks.