Is it possible to leave alt text empty for a required image of a Web Content Structure?
How To articles are not official guidelines or officially supported
documentation. They are community-contributed content and may not always
reflect the latest updates to Liferay DXP. We welcome your feedback to
improve How to articles!
While we make every effort to ensure this Knowledge Base is accurate,it
may not always reflect the most recent updates or official guidelines.We
appreciate your understanding and encourage you to reach out with any
feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
As a content creator, I would like to leave the alt text empty of an image which is set as required by the corresponding Web Content Structure. This would allow screen readers to skip reading the image descriptions for a picture which is decorative only.
Resolution
According to the following fix, it is intended to have image description (alt text) of an image which is set to be required by the structure:
https://issues.liferay.com/browse/LPS-99216
The thinking behind the logic of this feature is: if the requested image at the structure serve decorative purposes only, it should not be required.
If it is an important element of the page - therefore required, the alt text shall be required as well, partially because of the screen readers.
Did this article resolve your issue ?