W3C - make image twig output empty ALT attribute when no ALT text is provided

Created on 19 January 2021, over 3 years ago
Updated 30 October 2023, 8 months ago

Problem/Motivation

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

Steps to reproduce

  1. Add an image to a content page or slideshow ... and neglect to provide any ALT text.
  2. 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

🐛 Bug report
Status

Closed: won't fix

Version

4.0

Component

Templates

Created by

🇨🇦Canada gdaw

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • @kunal_sahu opened merge request.
  • 🇮🇳India kunal_sahu Karnataka

    I have created an MR , Please merge. Thanks

  • Status changed to Closed: won't fix 8 months ago
  • 🇺🇸United States shelane

    This theme will not be supported for Bootstrap 4. See alternative themes for this support.

Production build 0.69.0 2024