Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-02-24 01:53:02

classcreative
Member
From: Solihull
Registered: 2009-05-22
Posts: 12
Website

<txp:Article_Image /> missing alt tag when used in article_custom

Has anybody else noticed that their alt tags are missing when used in an article custom tag?

You can see an example of this on our website, our project images on the homepage are in an article custom and have alt=”“.

Thanks

Last edited by classcreative (2010-02-24 01:55:07)

Offline

#2 2010-02-24 04:04:30

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: <txp:Article_Image /> missing alt tag when used in article_custom

Hmm, if article_custom is retrieving an article image with an “id” it should be retrieving the alt value as well, both are returned by the same query. If you are using an URL in the article image field the article_image tag has no attribute for a setting or default alt value nor will it look at the URL you set for it. It may be something for the devs to look at. An idea of what code you are using and which method you are using to set the article image would help.

Offline

#3 2010-02-24 05:22:28

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: <txp:Article_Image /> missing alt tag when used in article_custom

classcreative wrote:

You can see an example of this on our website, our project images on the homepage are in an article custom and have alt=”“

Associated alt value is taken from the database. If the article image is not used from the DB, and used value is something else than the ID, then the image won’t have an alt attribute. An empty alt is used in those cases to make the source to validate.

Offline

#4 2010-02-24 08:48:51

classcreative
Member
From: Solihull
Registered: 2009-05-22
Posts: 12
Website

Re: <txp:Article_Image /> missing alt tag when used in article_custom

Ah…for some reason I was giving it a url rather than id. Thanks for your help.

Offline

Board footer

Powered by FluxBB