Use image alternative text instead of image title in carousel
-
The HTML markup generated by the carousel shortcode wrongly uses the image title for the alt=”” img attribute.
Please look at lines 1106 and 1108 of inc/core/shortcodes.php:
<img src=”‘ . $image[‘url’] . ‘” alt=”‘ . esc_attr( $slide[‘title’] ) . ‘” />
Could you please correct that, and get the slide alternative texts to be used in the alt img attribute, as it should be for proper SEO?
(you will also need to improve the get_slides() function in inc/core/tools.php in order to get the alternative texts from the WP media library)
The same remark applies to other slider image shortcodes, where the title is used instead of the alternate text specified in the WordPress media library.
Thanks
- The topic ‘Use image alternative text instead of image title in carousel’ is closed to new replies.