Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
No titles for images in 4.7.3?
After upgrading to v4.7.3 I noticed, that attributes title has disappeared from tags <img />.
Does it a bug, or a new feature? o_O
Last edited by J-zef (2019-03-18 19:00:12)
Credendo vidas!
Offline
Re: No titles for images in 4.7.3?
Hello, welcome to the forum.
Did txp image tags ever had title
attribute? What was your previous txp version?
Offline
Re: No titles for images in 4.7.3?
I think maybe the OP means the HTML title
attributes on the resulting <img>
tags because those were indeed axed. They used to be fed automatically from the caption but we ditched it for reasons I now cannot remember. There was a fairly long discussion about it somewhere.
A couple of avenues to explore:
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Offline
Re: No titles for images in 4.7.3?
etc wrote #317154:
we could probably introduce it? No title by default, a valueless
title
meancaption
andtitle="My Title"
works as supposed?
Sounds good.
For reference, here’s the commit back in 2014 that removed it. As I say, I forget why we removed it by default. Probably for accessibility or SEO reasons or something.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: No titles for images in 4.7.3?
The problem, if I recall the conversation, was that title=""
and <figcaption>
are two entirely different things, and it was always very annoying that an image’s title=""
attribute was being filled by the caption field.
Create a title
form field if you can, but please don’t cross the channels as before. ;)
Offline
Re: No titles for images in 4.7.3?
IIRC, title
is not an attribute of the img
tag, only alt
.
TXP Builders – finely-crafted code, design and txp
Offline
Re: No titles for images in 4.7.3?
etc, I upgraded my site form 4.5.3 or smth like this (yes, I procrastinated for a long time :)). I have a little script based on LightZoom, this script takes the image annotation from the title
attribute of the img
tag. And after upgrade it became broken, because img
tags have no attribute title
at all.
I fixed it in some way, using attribute alt
instead, but I like this attribute, and any other tag except img
has this attribute…
(and I don’t want to edit over 2000 images on my site, because I don’t remember exactly, what was written in their alt text
fields :))
jakob wrote #317163:
IIRC,
title
is not an attribute of theimg
tag, onlyalt
.
As I know, title
is an attribute of any html tag, including img
tag?
Credendo vidas!
Offline
Offline
Re: No titles for images in 4.7.3?
I think (and I’m dredging memory banks here) part of the reason for removing the title
attribute in the first place was precisely that it’s available in HTML, but its implementation at the browser level was not defined. Most browsers offer it as a tooltip, but it’s not guaranteed. And some screen readers are flaky with it. On mobile, well, it’s largely a waste of bytes as there’s no implicit hover state.
J-zef wrote #317165:
I fixed it in some way, using attribute
alt
instead, but I like this attribute, and any other tag exceptimg
has this attribute
We decided to axe it by default because, if you really needed it, you could just change your image tag to add it back by hand exactly how you wanted it. No need to revisit every image and make new alt texts or captions or anything. Can you not tweak your <img>
or <txp:image>
tags and add title='<txp:image_info />'
to restore this functionality?
Last edited by Bloke (2019-03-19 18:59:51)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: No titles for images in 4.7.3?
Bloke yes, I’ll try this. Thank you =)
Credendo vidas!
Offline
Pages: 1