Mandatory alt-text for images | Community
Skip to main content
New Participant
April 1, 2025
Solved

Mandatory alt-text for images

  • April 1, 2025
  • 4 replies
  • 1012 views

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!

Best answer by konstantyn_diachenko

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.

 

4 replies

kautuk_sahni
Employee
April 16, 2025

@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
Lokesh_Vajrala
New Participant
April 2, 2025
Shashi_Mulugu
New Participant
April 2, 2025

@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.

anupampat
New Participant
April 1, 2025

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
konstantyn_diachenko
konstantyn_diachenkoAccepted solution
New Participant
April 1, 2025

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.

 

Kostiantyn DiachenkoCheck out AEM VLT Intellij plugin
aa_wAuthor
New Participant
April 29, 2025

Hi, I've tried to create a workflow with participant step using specifically, the 'Workflow initiator participant chooser' step.

But it sends the notification to 'workflow-service' user, do you have any idea how to send the notification to the actual user who uploaded the asset?