-
AuthorPosts
-
March 17, 2021 at 7:01 pm #1288770
Hi there,
The images of the blog posts have got the alt image tag, but not the image tag. How can I add the title tag to the images? It could be the same like the alt tag … (or the title from the media gallery) At the normal pages the title tags are there.
Thank you & best regards
ElaMarch 22, 2021 at 3:03 pm #1289640Hey bts-de,
Sorry for the very late reply and thank you for your patience, so your image in this case is a background image of the link which does have the title tag:title="Individuelle Sonderanfertigung von MonLines, Soundbar Lift"
typically background images do not have titles for accessibility compliance. In this case, I believe it interferes with screenreaders when the link has a title tag that is wrapping a background image with another title tag.
I believe in your case the link title tag is retrieved from the image title field in the media library, and so if the image title tag was included then you would have two titles wrapped that are the same, which would cause accessibility issues.Best regards,
MikeMarch 25, 2021 at 2:04 pm #1290378Hi Mike,
Thank you for your answer!
Unfortunately I don´t see the title of the image (and our SEO Tool also not) and in my opinion it´s not a background image. The code:
The link of the image has got a title. Or am I misunderstanding something? Thank you very much for your help!As I see the code – there is the author visible. Can I somehow remove that (remove instead of hide) ?
Thank you & best regards,
ElaMarch 26, 2021 at 2:50 pm #1290577Hi,
Your image is not showing so I’m not quite sure what you wanted to show, but I don’t see an author tag in the link of the image.
What I was trying to point out is that the link has a title tag that wraps the image, please see the screenshot in the Private Content area.Best regards,
MikeMarch 26, 2021 at 3:47 pm #1290584Hi Mike,
right – the link has got a title, but I mean the image. The image has got just an alt tag, no title tag:
<img src="xxx.jpg" class="attachment-square size-square wp-post-image lazyloaded" alt="Crestron Soundbar Lift, weiß" sizes="(max-width: 180px) 100vw, 180px" srcset="xxx.jpg 180w, xxx.jpg 80w, xxx.jpg 36w" data-ll-status="loaded" style="" height="180" width="180">
I´ve made a screenshot with the author – please have a look, thank you!
Best regards,
ElaMarch 27, 2021 at 3:53 pm #1290748Hi,
I believe that the title tag of the link that wraps the image is the title of the image in the media library correct?
I tried to point out above that adding the same title to the link and the image will cause accessibility issues with screen readers.
In elements where the image is not wrapped in a link the title tag is applied to the image, but when the image is wrapped in a link the title tag is applied to the link. Do you plan on having your site compliant with users that have accessibility issues such as low sight?Best regards,
MikeMarch 27, 2021 at 8:28 pm #1290771the title tag was not supported by WordPress anymore.
that was a surprise for me too. But if you look in (not enfold !- wordpress) wordpress / wp-admin / includes / ajax-actions.php line: 3251:$title = ''; // We no longer insert title tags into <img> tags, as they are redundant.
i discussed it with Günter to get back the attachment title to the images inserted via “Add Media” in text-block : https://kriesi.at/support/topic/images-with-link/
we/he found a way to newly inserted images via an existing filter – but allready inserted Images are not touched by this.:
https://kriesi.at/documentation/enfold/image/#add-title-attribute-to-new-inserted-image-via-add-media-buttonMarch 28, 2021 at 2:45 pm #1290932Hi,
@Guenni007 thank you for this info, I had not looked at the WordPress core code, I believe that this also points to WordPress working to make the core files accessibility compliant as this double title tag causes issues with screen readers. I would not recommend using a filter to force what WordPress is removing, but this will naturally be up to each user to decide.Best regards,
MikeMarch 29, 2021 at 12:29 pm #1291079if you insert on a text-block a media ( which might often happen on blog posts that are only made via the classic editor) or on text-block alb.
these images will have no title tag. Where does a double title tag comes from on that images ?March 30, 2021 at 11:27 am #1291333Hi,
I’m referring to images that are wrapped with links, so adding a title tag to the link and to the image is the issue that I am referring to that will cause accessibility issues.Best regards,
MikeMarch 30, 2021 at 11:57 am #1291345yes you are right – but on absense of a title the src Attribute will be read ? and that is realy strange
But my intention of having titles is for those images with light-box link.
Even the image alb element of Enfold got no titles on the link – and the lightbox bottom-bar is filled on default with the title attribute of the img.
Yes i know we can change that.
So the best thing would be – if there is a link to img – the title tag of the img should be passed to the anchor – and the lightbox then gets the caption from this title tag.April 1, 2021 at 1:04 pm #1291770Hi,
That is a good point, and I’m glad that you and Günter are working together on this, but unfortunately this is above my skill set and is not directly affect this user’s issue, but thank you for bringing it up as it does relate in a way.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.