Problem/Motivation

Images without an ALT attribute will fail basic W3C HTML validation.

Steps to reproduce

Add an image to a content page or slideshow ... and neglect to provide any ALT text.
Validate the HTML using W3C validator to see the error message about < img > must always have alt="" at the very least.

Proposed resolution

Modify the image twig to at least output an empty ALT attribute when no ALT text attribute is provided, and of course also output the ALT text when that is available.

Remaining tasks

None

Comments

gdaw created an issue. See original summary.

gdaw’s picture

Version: 8.x-3.x-dev » 4.0.x-dev
gdaw’s picture

gdaw’s picture

gdaw’s picture

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

seems to make sense, I haven't debugged this extensively but it appears that twig code {{ alt }} contains the alt,

Trusting GDaw work on this but ya, without GDaw work on wcag we'd not be getting such amazingly high scores.

sylus’s picture

Status: Reviewed & tested by the community » Fixed

Committed and attributed thanks so much :D

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.