Alt attribute of slider image


#1

Hi.
The W3C Markup Validation Service shows that only images of the slider from the front page are shown without an alt attribute, despite the fact those images had alt in my media library.
So… there must be a php file that controls it and where it is possible to add some code to made slider’s images have an alt attribute too.
Would you be so kind to tell me where and what should I add?
Thanks in advance :wink:


#2

Hello,

Yes that is correct but alt isn’t required for images which isn’t main part of the content so non visual browser may omit these images. In this situations lat doesn’t need to be provided or it can be set to be empty string. If you want to do that you can make edits inside wp-content/themes/quill/inc/slider.php like this for all 5 slider images https://www.screencast.com/t/SO5HZZiR .

If you however want to rad image alt tag then you should modify each line like explained in answer to this topic https://stackoverflow.com/questions/36869499/how-to-get-alternate-text-of-image-using-get-theme-mod but note that some coding knowledge is required in order to set this properly.

After any change to this file you will need to set images for your slides again and after that modifications will be visible.

Best Regards!