YOOtheme Pro is here! The best WordPress and Joomla theme. Learn more

Avatar ckgdm asked

Adding title tags to images used in Widgetkit 2 content

I can't find any reference to this but it must be a common issue.

I'm using Joomla 3.4.8
Widget kit 2.5.3
Various themes across multiple websites

How can we add title tags to images that are used within widgetkit 2 - for example the images used as media in a grid stack?

Thanks in advance

  • Widgetkit

10 Answers

1

Avatar cornelius.fichtner answered

Hello Michael,

I ran into the same problems with SEO / Title attribute and did some research. Here is what I have found:

HTML5 does indeed support the title attribute for the img tag.

Please see here http://www.w3schools.com/tags/tag_img.asp and scroll down to the "Global Attributes" section. When you follow the link you can see that the title attribute is listed and that these global attributes can be used on any element. Including img.

I believe it is time to reconsider implementing this into Widegetkit because here is what happened to me:

We recently redeployed a website using lots of Widgetkit 2 widgets, and immediately all our monitoring tools began throwing SEO errors at us. The primary error we get is "Image is missing title tag".

So... is the fact that the title attribute is permitted on an img, and that everyone who is using Widgetkit 2 is getting these SEO errors a strong enough argument for Yootheme to change their position on this topic and give us what we need?

Thank you!

1

Avatar dancer answered

Hello YooTheme - Support,

are there any news on that? It would be good to have this in the next version of widgetkit or at least a workaround, as this is, as olaf.radloff already wrote, standard today.

BR

0

Avatar michael.maass Support answered

Mind that only an HTML a element can have a title attribute. An HTML img element does not have a title attribute. There can only be an alt attribute for an image.

In a folder based Gallery where the items are not separately defined the alt attribute will show the file name without the file extension. It cannot be manually changed or edited from within Widgetkit because a folder is loaded "as is".

In a Widetkit "Grid Stack" where you manually define separate items within a Widgetkit you can enter a text into the field "Title" which will then be used as the value for the alt attribute:

Image

Thank you

0

Avatar ckgdm answered

Thanks Michael

I did spot that the title in widgetkit is replicated as the alt tag but I'm struggling to understand your statement that an html image element does not have a title attribute. Do you mean that it does not have a title attribute in widgetkit?

Adding titles attributes to images on website is spoken about all over the internet. In Joomla articles you set this title attribute in using the image caption. Within html you easily add it in the code e.g. title="image title" alt="image alt"

Is that what you meant - that it is not possible in widgetkit?

0

Avatar michael.maass Support answered

[...] I'm struggling to understand your statement that an html image element does not have a title attribute. Do you mean that it does not have a title attribute in widgetkit?

As far as I know an HTML img element is not meant to have a title attribute. This is what the alt attribute is for. Take a look at https://www.w3.org/TR/html-markup/img.html to see which attributes officially exist for this element. title was not among the attributes listed when I looked.

An HTML a element can have a title attribute. See https://www.w3.org/TR/html-markup/a.html for more information about the attributes for this element.

Within html you easily add it in the code e.g. title="image title" alt="image alt"

You could add anything you like as long as the attribute name is followed by an equal sign and a quoted value. But manually changing HTML markup is much different from having it created by an extension.

Widgetkit does not add it to an img by default. And having it automatically added — populated from the content of the field "Title" for instance — requires the creation of a customized Widgetkit.

Thank you

Edited

0

Avatar ckgdm answered

Thanks Michael,

Is there a way to do it in widgetkit even though it doesn't not add it by default?

0

Avatar danijel.mlinarevic answered

Hi Michael,

that is not the current state. For SEO purposes, images should have a title tag. Please see i.e. https://de.onpage.org/wiki/Bilder_SEO. Could you please provide us a workaround to automatically set the title for an image as well?

Thanks in advance

0

Avatar michael.maass Support answered

@danijel.mlinarevic

that is not the current state. For SEO purposes, images should have a title tag. Please see i.e. https://de.onpage.org/wiki/Bilder_SEO.

You may re-read that page. The only place where a "title" is mentioned is

Title-Tag: Auch der Meta-Title sollte verwendet werden, um ein relevantes Keyword unterzubringen.

The term "title tag" usually refers to an HTML page's title as in

<html>  
    <head>  
        <title>My page</title>  
    </head>  
    <body>  
        ....  
    </body>  
</html>

Nowhere do they mention an HTML attribute for an img element as in

<img title="An oak tree" alt="An oka tree" src="images/trees/oak.jpg" >

As far as I know this title attribute would be snytactically wrong. An image uses the the alt attribute. And the page you linked to doesn't tell any different.

Sorry to insist, but according to the syntax an HTML img element is not supposed to have a title attribute.

Thank you

0

Avatar ckgdm answered

Totally agree Cornelius - it is time to implement this please

0

Avatar olaf.radloff answered

Of course there is a title tag for images! All CMSs have standard fields for that tag.
The only question is why it is not implemented - because this is absolutely standard for SEO these days.

getimo

Know someone who can answer? Share a link to this question via email or twitter.