Search…

X3 Photo Gallery Support Forums

Search…
 
metallissimus
Experienced
Topic Author
Posts: 331
Joined: 17 Oct 2019, 06:54

Alt and title attributes of images

25 Apr 2023, 06:13

Hey Karl,

I just filled in the titles and descriptions for some images in a gallery and realized that the title goes to the alt attribute and the title attribute remains empty. To me it seems more logical to have the title go to the title attribute and the description to the alt attribute. What's the reason for the current behaviour and can I change it?
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Alt and title attributes of images

25 Apr 2023, 06:29

The title and alt attribute are two completely different things. The alt attribute is used by search engines for an alternative description of the image. It would definitely make sense to show the shortest possible alternative text for the image, which would be the title.

The title attribute isn't relevant for anything. It's only used to display browser's own little tooltip on mouse hover, but no websites really use this and it's often annoying. If it's important to display mouse hover info, you should use tooltip instead.

In conclusion, only the alt tag is of relevance, and it should display the most precise alternative text for the image, which should be the title.
 
metallissimus
Experienced
Topic Author
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: Alt and title attributes of images

25 Apr 2023, 06:44

I understand and agree that the title attribute is basically irrelevant.
mjau-mjau wrote: It would definitely make sense to show the shortest possible alternative text for the image [in the alt tag]
I don't agree with that though. I think the alt tag should be more descriptive than a title.

Example:
Title: Outdoor business headshot
Description: Business headshot of a young woman taken in front of an ivy covered wall.

I think the description is the better alt tag, because it provides more detailed information.

Google also encourages descriptive alt text: https://developers.google.com/search/do ... e-alt-text

In this case I can put my former description in the title because I don't display the title. But if I did display the title, I would need to make some compromise here.
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Alt and title attributes of images

25 Apr 2023, 12:21

metallissimus wrote:Google also encourages descriptive alt text: https://developers.google.com/search/do ... e-alt-text
As you can see in the examples on that page, the ALT tag is short and concise.

This we could debate forever, because it depends on how you populate your title and descriptions. In general, similar to IPTC standards, the title is supposed to be a short concise caption headline, one sentence max (optimally). The description on the other hand, could be several sentences, easily and potentially too long for the alt tag, possibly also considered "keyword stuffing". Also, many users (including myself, and the X3 demo) only require a single caption, which should be the title/headline, leaving the description empty. Furthermore, when using titles AND descriptions, many would write their title/description combo's with title actually describing the image, while description has a story, not necessarily describing the image. Typical scenario:
https://demo.photo.gallery/examples/features/captions/

In either case, it's really not reasonable to assume the description is a better alt tag than title. I also would be skeptical to the amount of text it is wise to add into the alt tag.
metallissimus wrote:In this case I can put my former description in the title because I don't display the title. But if I did display the title, I would need to make some compromise here.
Not sure I understand the dilemma. In X3, you can choose to display title or description or both or none.
 
metallissimus
Experienced
Topic Author
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: Alt and title attributes of images

25 Apr 2023, 12:30

mjau-mjau wrote: This we could debate forever
No need for that, I understand where you are coming from and this is one of the probably many cases where you simply can't make everyone happy with a single solution. I guess for most X3 users it's working just fine.
Not sure I understand the dilemma.
What I wanted to say: In this case, I can use what I would rather consider a description as the title (so it goes into the alt tag). This works for me because I don't display this title. If I wanted to display a (shorter) title but still have a (longer) alt text, I don't know how I would solve this right now. But at this point this is a theoretical problem, so I don't need a solution.
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Alt and title attributes of images

25 Apr 2023, 23:41

Of course, something like this could be added as an option, but at this point it seems pointless to bloat options further. Something to think about ...
metallissimus wrote:If I wanted to display a (shorter) title but still have a (longer) alt text, I don't know how I would solve this right now. But at this point this is a theoretical problem, so I don't need a solution.
In this case, you could populate your title for the ALT text, and descriptions for display. You would then adjust settings to only show descriptions, hiding the title, effectively reserving title for alt and description for display.