I need to support an empty alt attribute on images. Looking at the code (and error message after leaving the required alt field blank) it says to enter two double-quotes. This does not work for me.
When I double-click the image in CKE4 to edit the attributes, it defaults to the value from the image as expected. Then if I enter ""
for the alt text and click the "Embed" button, looking at Source mode I can see the alt attribute is not there, as expected. But when I double-click the image again to edit it, the alt text is defaulted back to the alt attribute from the image; doesn't preserve the empty value. With the current setup, there is no way for a user to add an empty alt attribute to an image.
The issue appears to be the submitConfigurationForm() method on the ImageFieldFormatter class. It looks for the double-quotes in the alt field, and replaces it with an empty string. This does not allow the other logic to find the double-quotes to keep an empty alt value.
Active
1.6
Miscellaneous