Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mandatory alt-text for images

Avatar

Level 2

I'm trying to enforce alt text for images in AEM. I've used a metadata schema to make the "description" field required, but authors can still drag and drop images without alt texts and upload them.

 

Is there a way to strictly enforce alt text before an image is uploaded or used? Any guidance would be appreciated!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

5 Replies

Avatar

Community Advisor

Hi @aa_w ,

 

You can always use a HTL level render condition like

<sly data-sly-test="${properties['altText']}">
 
On a dialog level, once the image is dropped, add a popup with a warning if alt Text is not present for the image 
Or
On Dialog submission, do a check if the image has an altText, do not allow the author to submit the dialog if altText is not present. You will have to play around JS for dialog level restrictions. Hope it helps.
 
Regards,
Anupam Patra

Avatar

Community Advisor

Hi @aa_w ,

 

Along with solution suggested by @anupampat , I'd suggest to trigger new workflow with participant step to asset creator. This workflow will put an item to inbox with title "Configure asset title/description". 

 

Best regards,

Kostiantyn Diachenko.

 

Avatar

Community Advisor

@aa_w i would suggest you to not to solution it from sites perspective but solution it from assets perspective.

 

I would request you to introduce an asset approval process during which you need to check all mandatory fields validation,  compliance checks etc and then approve.

 

Only approved assets should be made available for sites author to be used in page authoring.

Avatar

Community Advisor

Avatar

Administrator

@aa_w Did you find the suggestions helpful? If you need more information, please let us know. If a response resolved your issue, kindly mark it as correct to help others in the future. Alternatively, if you discovered a solution on your own, we'd appreciate it if you could share it with the community. Thank you !



Kautuk Sahni