Add alt text to spacer elements
authorBradley Taylor <hello@brad-taylor.co.uk>
Tue, 12 Oct 2021 15:04:23 +0000 (16:04 +0100)
committerBradley Taylor <hello@brad-taylor.co.uk>
Tue, 12 Oct 2021 15:04:23 +0000 (16:04 +0100)
commit76f9c714dbf84368aefe658d3a18fc839ae65150
treea18ae4431c384af6fd6808b39e7d34833fe99e27
parent8766a2e7d07cecadb2816fc415e6a44fe9bc5271
Add alt text to spacer elements

All HTML img elements should contain an alt attribute.
For decorative or spacer elements this alt text should be a blank string,
which indicates to assistive technologies that the image should not be announced.

Longer-term these spacer gifs could be replaced with empty <span> elements.
Inline-block css has been added to allow for this change in future,
however, the HTML element has not been changed for now to avoid breakage with non-default themes
(e.g. civicrm-admin-utilities WordPress plugin which replaces the default css/civicrm.css file)
CRM/Utils/Weight.php
css/civicrm.css