Jquery Flexslider No Alt Attributes (WordPress)


#1

Hi

Great to jump on board. I am pretty new to all of this. KI have website that uses Jquery Flexslider and i havent got any alt tags. I have done some searching but nothing seemed to help. This is a page of the website where the flexslider is located. www.embarkboathire.com.au/boats/galaxy/

Not sure what code i need to give you.

This is the code from the flexslider

Any assistance will be very gratefully received

Thanks

Danny


#2

Umm … shifty_suspect

When you do post your code on the forums, you’ll need to format it so it will display correctly, @danny35.

You can highlight your code, then use the </> button in the editor window, or you can place three backticks ``` (top left key on US/UK keyboards) on a line above your code, and three on a line below your code. I find this approach easier, but unfortunately some European and other keyboards don’t have that character.


#3

Below is the part of the code with alt tag code i think. I left out everything else.

Thanks

Danny

  setupPaging: function() {
                    var e = "thumbnails" === n.vars.controlNav ? "control-thumbs" : "control-paging",
                        t = 1,
                        a, s;
                    if (n.controlNavScaffold = $('<ol class="' + i + "control-nav " + i + e + '"></ol>'), n.pagingCount > 1)
                        for (var r = 0; r < n.pagingCount; r++) {
                            s = n.slides.eq(r), void 0 === s.attr("data-thumb-alt") && s.attr("data-thumb-alt", "");
                            var c = "" !== s.attr("data-thumb-alt") ? c = ' alt="' + s.attr("data-thumb-alt") + '"' : "";
                            if (a = "thumbnails" === n.vars.controlNav ? '<img src="' + s.attr("data-thumb") + '"' + c + "/>" : '<a href="#">' + t + "</a>", "thumbnails" === n.vars.controlNav && !0 === n.vars.thumbCaptions) {
                                var d = s.attr("data-thumbcaption");
                                "" !== d && void 0 !== d && (a += '<span class="' + i + 'caption">' + d + "</span>")
                            }
                            n.controlNavScaffold.append("<li>" + a + "</li>"), t++
                        }

#4

Hi @danny35, this looks like the code from the plugin responsible for generating the thumbnails; for those it seems you have to specify them as data-thumb-alt attributes. But you don’t have any regular alt attributes on your images to begin with…


#5

Hi I have put an alt tag on each of the images within media library in WordPress.

Thanks

Danny


#6

Then this is an issue with your wordpress setup and how those images are getting generated… I can move this topic to the CMS category if you like, or you can just start a new one there.


#7

For sure my mistake because it is a jquery slider thought it was to do with javascript.

Thanks

Danny


#8

Hi

I have tried a few different plugins to try and get it to work but no joy. Because this is a custom page template dont want to go for a complete redesign if i can help it as the page looks great. I went through the files on the original theme its definitely the flexslider one that needs to the alt tag codes added to show them. There are a few posts on the web about this issue. Not sure if i am making a big deal about all this and alt tags are no longer important.

Again many thanks for reading

Danny


#9

That sounds as if that template simply doesn’t include the alt attributes. Can you post the source code responsible for generating the slider markup?


#10

Hi

Thanks for the reply. I changed the plugin to a different slider and it got rid of around 800 missing tags. Not sure if this should be a new question or not. The only ones i have left are pictures in blogs and categories. It looks like the code it there just the alt tag thats empty.

<img src="https://www.embarkboathire.com.au/wp-content/uploads/2018/08/the-island-7-710x410.jpg" alt="" />
 </a>
</div>

It looks like the same images are used on both.


Apologise if i have done anything incorrect.

Thanks

Danny


#11

Nothing to apologise for, but I’m not sure if I can help you here… it’s impossible to tell what’s going wrong by just looking at those pages. As you say it’s a custom page template my guess would be that this template doesn’t generate the image tags correctly, but it may well be an issue with your theme in general or with one of your plugins, or with your plugins interfering with the theme or with each other… wordpress is all too easy to mess up like this.

To pin down the problem, try disabling all your plugins. If the problem still occurs, it’s an issue with your theme / custom template; otherwise incrementally enable the plugins to find out which one is screwing up the alt attributes.