Select to view content in your preferred language

Handling Alt Text for Dynamic Images

83
5
16 hours ago
ZachBodenner
MVP Regular Contributor

This one might not have an actual Solution right now, so consider this a discussion: How are you applying alt text to images in Experience Builder that get dynamically rendered from either attachments or links, etc? An example: I have an app where selecting a feature on the page triggers an Image widget to show an photo from a link.

 

ZachBodenner_0-1785162631174.png

 

Dynamically populating alt text is difficult - alt text should be an actual description of what appears in the image. The best thing I can do right now is something like this:

ZachBodenner_1-1785162666812.png

 

Technically, it meets ADA standards but it's pretty unsatisfying and less than helpful for someone who a sight impairment. Has anyone else found a better way to handle this situation?

 

Happy mapping,
- Zach
Tags (3)
0 Kudos
5 Replies
LReis
by
Emerging Contributor

Is it feasible for you to add a separate field for the alt text in your table/feature class, in the same way that you have the URL for the image? I think this would be the easiest way for you to get what you are looking for. Then you could choose "Attribute" for the alt text and select that field, rather than calculating an expression. This worked with some test data that I created.

AltTextExample.png

ZachBodenner
MVP Regular Contributor

That's a good idea that would work in this case, but not all. Namely, if it's an attachment instead of a link, that wouldn't really work since the actual attributes of the attachment table aren't exposed in those selectors. 

Happy mapping,
- Zach
0 Kudos
LReis
by
Emerging Contributor

I would be curious to hear more about your imagined use case for an attachment as the linked image, and if that would include the possibility of choosing between multiple attached images for a single item in a table/feature class. If it's a single attached image, the same idea could be used, where you could include a field that has the alt text for that image.

0 Kudos
ZachBodenner
MVP Regular Contributor

I mean that kind of happens all the time. I have another application where we've got park polygons with multiple professional photographs of the park attached. It would be nice to be able to apply dynamic text to each of them so I don't need to pick just one and do one of the workarounds discussed so far.

Happy mapping,
- Zach
0 Kudos
MichaelVolz
Esteemed Contributor

Just adding my thoughts here with a custom print service, as the same issue occurs there.  Any image created from the custom print service is not ADA compliant.  The idea of intercepting the image after creation and populating alt text sounds like it would require advanced programming skills since this option is not provided out-of-the-box.

0 Kudos