Empty attribute value stripped by Sightly
HI All,
We have a scenario where we want the empty alt attribute to be preserved as alt="" instead of stripping the empty string.
Screen readers skip the image when alt="" whereas if only alt is found, some screen readers like Jaws and NVDA do not skip the image.
What we want: <img src="xyz" alt="">
The issue we have now: <img src="xyz" alt>
This is with any attribute that has an empty literal string. Sightly strips them from the output. We're using AEM6.2 which uses Sightly version 1.2. I've tested on AEM6.4, which has Sightly 1.3 and we have the same issue. According to Sightly documentation htl-spec/SPECIFICATION.md at master · Adobe-Marketing-Cloud/htl-spec · GitHub Sightly Version 1.4 preserves empty string attributes.
I have read a similar post Re: AEM 5.6.1. Empty Alt tag removed from RTE and I think Transformer factory is an option.
I have tried empty string array "{['']}" that some people have said works for them.
Is there any simple way at all to achieve this? I'm bemused that this hasn't already been reported.
Thanks in advance for you help.
Regards,
Anjali
