Alt tag for header slider

Hi there,

I have recently checked all the alt tags for my website, and only the one for the header slider is missing.
I read about this topic (Alt Tag Slider & SEO - Image Alt tag), I wonder if you have improved that issue since 2018?

If not, can you tell me where to fix it or how to fix it (even if it sounds difficult), I need to resolve this absolutely!

thanks for your help,
best regards,
Séve

Hello there,

We haven’t yet added ALT tag to header slide images. Sorry :frowning: Because there’s very less demand coming from our users. For temporary solution, try doing the below steps:

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box
jQuery(function($) {

  // Slide 1
  var alt1 = 'Alt text for slide 1';
  $('.header-slider .slide-item:nth-of-type(1) .mobile-slide').attr('alt', alt1);

  // Slide 2
  var alt2 = 'Alt text for slide 2';
  $('.header-slider .slide-item:nth-of-type(2) .mobile-slide').attr('alt', alt2);

  // Slide 3
  var alt3 = 'Alt text for slide 3';
  $('.header-slider .slide-item:nth-of-type(3) .mobile-slide').attr('alt', alt3);

  // Slide 4
  var alt4 = 'Alt text for slide 4';
  $('.header-slider .slide-item:nth-of-type(4) .mobile-slide').attr('alt', alt4);

  // Slide 5
  var alt5 = 'Alt text for slide 5';
  $('.header-slider .slide-item:nth-of-type(5) .mobile-slide').attr('alt', alt5);

});
  1. Update

Regards,
Kharis

Hi Kharis,
thanks for your quick answer.
So I did as told, but I cannot see the alt text in code source.

Where did it go?
In the code you gave, is there anything to replace?

Thank you for resolving this!

Regards,
Séverine

Hello Séverine,

That script doesn’t add in the source element. It inserts the ALT tags while web browser loads your site. You should check it with this tool https://adresults.com/tools/alt-tags-checker/

Regards,
Kharis

Hello Kharis,
well I’d like to tell you this is ok, but is adresults really reliable ???
It doesn’t find my different websites and 1 site found is supposed to have 6 images (instead of 100s)
;/

It isn’t reliable since it’s just a temporary solution. I’ll ask for our developer to do permanent fix for this in the next version. Please be patience.

Regards,
Kharis