GX2016: img has no alt attribute
An img element has no alt attribute, so a screen reader has no text for the image.
Cause
A user of a screen reader gets the alt text in the place of the image. An image with no alt attribute gives the file name, or nothing.
Gx gives no finding for an image with a spread, with role or with aria-hidden.
Example
package team
<figure>
<img src="/team.png" width="320" height="200">
<figcaption>The team</figcaption>
</figure>gx check reports:
team/Photo.gx:4:3: GX2016: the <img> has no alt attributeFix
- Write the text of the image:
alt="Five people at a table". - For an image that is only decoration, write
alt="". A screen reader then ignores it.