Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Is there a way to add alt text to an A/B hero image test in target?

angiep33244241
Level 1
Level 1

Hi all, 

 

I'm currently running an A/B image test and want to know if there is any way to add alt text to the image I'm testing within adobe target? We would usually have alt text added on our backend but since we are testing the image through Target we can't add it like that. 

 

Has anyone else ran into this and if so, how what were the steps you took to add alt text?

 

Thanks!

1 Accepted Solution
rajneesh_gautam
Correct answer by
Level 5
Level 5

Hi @angiep33244241 

 

You can use custom code to change Alt text:

 

// jQuery
$('img').filter(':first').attr('alt', 'My image')

// Vanilla
document.querySelector('img').setAttribute('alt', 'My image')

from: https://gist.github.com/joyrexus/7307312

 

 

View solution in original post

1 Reply
rajneesh_gautam
Correct answer by
Level 5
Level 5

Hi @angiep33244241 

 

You can use custom code to change Alt text:

 

// jQuery
$('img').filter(':first').attr('alt', 'My image')

// Vanilla
document.querySelector('img').setAttribute('alt', 'My image')

from: https://gist.github.com/joyrexus/7307312

 

 

View solution in original post