Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2014-02-17 17:41:09

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

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

#26 2014-02-17 18:07:35

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 479
Website

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

#27 2014-02-17 18:27:30

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,268
GitHub

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

#28 2014-02-17 19:20:23

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,456
Website GitHub

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

#29 2014-02-17 20:44:09

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

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

#30 2014-02-17 21:39:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,456
Website GitHub

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

#31 2014-02-17 22:55:20

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

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

#32 2014-02-17 23:03:32

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

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

#33 2014-02-17 23:05:19

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: Image caption

Oops, I didn’t refresh the browser. The elves worked while I typed.

Thanks, Steph!

Offline

#34 2014-02-18 02:29:54

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,202
Website

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

#36 2014-07-20 19:32:49

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,268
GitHub

Re: Image caption

wavesource wrote #282318:

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?

You’ll be needing rah_flat – if Jukka makes something, it’s a solid bet it does the job well.

Offline

Board footer

Powered by FluxBB