Epub validation error cuased by aria-describedby attribute
Expected behaviour
When "Long description" attribute isn't used in cofig, the attribute should be included
Current behaviour
In the Ketty app we get an epub validation error: The aria-describedby attribute must refer to elements in the same document (target ID missing)
this attribute isn't enabled for users to add.
Steps to reproduce
- Add image in chapter
- Try export to epub
- Get error
- Got back to image image and inspect
<img src="https://kotahi-s3.cloud68.co/test2-ketida/703ba07ac798_medium.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=gbrqLPQZVrxwcsBaRztVkJTdLNqVOo%2F20240729%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240729T145537Z&X-Amz-Expires=86400&X-Amz-Signature=90f15f9ff0bbf750f14aa4b0461f0ad3d2e63ef34d547b521589cd28d0193564&X-Amz-SignedHeaders=host" alt="This is alt text" aria-describedby="1562dbee-7553-4df6-aa56-7975b5968141" aria-description="" data-id="abdde0c3-f315-448f-a9c4-107b9896d87b" data-fileid="0567f6bf-02cd-4ed2-8b8b-7631be460e1b" contenteditable="false" class="">
Environment
Possible solution
The fix in wax should avoid adding aria-description if we haven't specified that we want to use image descriptions in the config