Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Image caption
Captions should never be utilised for image `title` attribute, that needs to be changed in core in my opinion. In fact, the image `title` attribute is utterly redundant – it’s not used by screen readers and it has no accessibility or SEO benefits. That’s what we have the `alt` attribute for. Just get rid of it being used for `title`.
Captions are in no way required in most situations, and by implying it as ‘fig caption’ gives the impression that it’ll automatically turn your image into a figure/figcaption combination without any further input. People might want to use captions for other things. I’m happy to leave that labelling as-is. Captions should be allowed to use Textile or strip Textile though, as a setting, whichever the user wants to do.
Site (theme) images shouldn’t even be in the CMS, if you are doing that then you are doing it wrong. Only content images should be in the CMS. That would be as bad as putting CSS styling into the CMS database*.
*we need to encourage not putting CSS into the CMS database.
Offline
Re: Image caption
philwareham wrote #279026:
Captions should never be utilised for image `title` attribute, that needs to be changed in core in my opinion. In fact, the image `title` attribute is utterly redundant – it’s not used by screen readers and it has no accessibility or SEO benefits. That’s what we have the `alt` attribute for. Just get rid of it being used for `title`.
+1 title attribut is unnecessary in <img />
@Destry
Actually, instead <txp:image />
tag, you may use
<img url="<txp:image_url />" alt="<txp:image_info type='alt' />" />
Last edited by sacripant (2014-02-17 18:12:11)
Offline
Re: Image caption
philwareham wrote #279026:
That would be as bad as putting CSS styling into the CMS database*.
*we need to encourage not putting CSS into the CMS database.
+1
Offline
Re: Image caption
philwareham wrote #279026:
Just get rid of it being used for `title`.
Well that makes things easy. Alter the <txp:image>
, <txp:article_image>
and <txp:thumbnail>
tags to output no title and that’s it. Then it’s entirely user-defined (via <txp:image_info />
) what you use the caption for.
Any objections?
we need to encourage not putting CSS into the CMS database.
Que? Get rid of Presentation->Styles? :-s
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: Image caption
I’d be more than happy to see title
gone. This article sums it up pretty well I think.
As for styles within the CMS, no we can’t get rid of it unfortunately, though it’s a relic from the past and just plain bad. Maybe an option to completely hide it like we do with comments when turned off may suffice. That and lack of flat (file based) template support are my two major pet hates about Textpattern (luckily Jukka has a plug for flat files).
Don’t get me wrong, I love Textpattern, but those were really shit design choices. As was calling template partials ‘forms’.
Offline
Re: Image caption
philwareham wrote #279032:
I’d be more than happy to see
title
gone.
Done. A mere 6 years after the feature request was opened. That’s gotta be a record.
Note that I’ve also removed the caption from the anchor’s title
attribute if you use link="1"
in <txp:thumbnail />
, for the same reasons as stated above. People who want a title attribute will have to roll their own anchors now. Is that a bad thing?
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: Image caption
Great! Nice to see some commits to the core too – been a while! My ton of website work eases after this week and I’m itching to some more Textpattern core development.
Offline
Re: Image caption
If I understand all of that, then what we’re saying is simply change the existing Caption field so it’s just free text output, and not tied to the title attribute. Correct? If so, that’s great with me. I’d only suggest changing the field from a text input to a textarea so it’s a lot easier to edit longer captions.
Offline
Re: Image caption
Oops, I didn’t refresh the browser. The elves worked while I typed.
Thanks, Steph!
Offline
Re: Image caption
Bloke wrote #279038:
Done. A mere 6 years after the feature request was opened. That’s gotta be a record.
:) :) — Stef, you saved my day when I saw the TXP checkins when checking the mail early this morning.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
#35 2014-07-20 15:55:47
- wavesource
- Member
- From: Australia
- Registered: 2011-08-02
- Posts: 56
Re: Image caption
philwareham wrote #279032:
That and lack of flat (file based) template support are my two major pet hates about Textpattern (luckily Jukka has a plug for flat files).
Bonjour. For using flat templates I have been using a method elsewhere in the forum, eg. <txp:php>echo parse(file_get_contents(‘RELATIVE_URL/form.php’));</txp:php> which works fine, though it is open to tampering by clients if I let them access pages/forms… soooo I was wondering if Jukka’s plugin, if it exists (I had a look on TXP.org and couldn’t see it straight away), offers any advantages?? Can anyone point me in the right direction?
Last edited by wavesource (2014-07-20 15:56:04)
Offline
Re: Image caption
Offline