Missing alt="" title="" tags on Images

8 replies [Last post]
rmbranson
rmbranson's picture
User offline. Last seen 4 days 13 hours ago. Offline
Joined: 20/11/2009
Posts:

Firstly I've just started using PP & Drupal so am still finding my feet. Upgrading my current site from a static HTML site to our new dynamic PP site has been eventful, but pleased to say so far all going relatively smoothly. My thanks to PP & Drupal community for some excellent code.

So I have got some content on the site using the standard tools provided for creating a node. Most nodes will have included a main image that will then display as a teaser image on the front page as well as in Channels & Editions.

My question is how can I get the alt="" title="" tags on Images to display when they appear on these other pages that are using the teaser view?

As we are a magazine website my main priority is to make the site search engine friendly. I've just used the seo browser provided by domaintools and realised the above problem exists.

Any advice on how this may be resolved would be greatly welcomed.

Thanks again. RB

__________________

Richard Branson
- Wellbeing Magazine implemented Prose Point system in November 2009. www.wellbeingmagazine.co.uk
- Thank You to the PP Team

beng
User offline. Last seen 55 min 17 sec ago. Offline
Joined: 27/02/2009
Posts:
The <img> tag of that image has empty alt and title attributes

Hi,

Yes, you are correct.

Let me summarise this topic from my viewpoint to make sure we are both talking about the same thing.

When a story node is displayed as a teaser, and there is an associated small-sized image extracted out and displayed as part of the teaser's presentation, the <img> tag of that image has empty alt and title attributes.

This issue does not occur when a story node is displayed in full.

The bad news is ...

There currently isn't any easy way to configure the alt and title attributes for teaser images.

The good news is ...

However, I do acknowledge this is a desirable feature to have for accessibility and usability reasons, so I should try to implement it sometime in the near future.

One issue I foresee is that different people will want the alt and title attributes to display different things. Depending on personal opinion, these attributes should display:

1. Information about the image being displayed, or
2. Information about the parent node (ie. the story and story's content), or
3. The same alt and title values that are displayed when the story is displayed in full.

Since you're the only user who has brought this topic up, I'd like to get your opinion on which of 1, 2 or 3 you think makes more sense.

(I'm tempted to default to 3)

rmbranson
rmbranson's picture
User offline. Last seen 4 days 13 hours ago. Offline
Joined: 20/11/2009
Posts:
The <img> tag of that image has empty alt and title attributes

Hi Beng,

Thanks so such for a prompt response.

You are spot on with your interpretation of the issue and that this would be a desirable feature to have for accessibility and usability reasons. And I completely understand that a work around would be possible but some what time consuming to solve (even with my rather limited knowledge of PHP). Therefore if we can add this to my wish list that would be great.

"One issue I foresee is that different people will want the alt and title attributes to display different things. Depending on personal opinion, these attributes should display:"

I totally agree with you on this statement, that people will want different things.

But at the end of the day I fall into one camp and only one and that is to follow advise given by the likes of Google & W3C on such accessibility matters.

So from your 3 choices it would definately be number 3 (3. The same alt and title values that are displayed when the story is displayed in full.), and you just have to trust that folks using PP also follow the accessibility advise and name their images inline with Googles recommendation which would be your first option. (1. Information about the image being displayed).

Personally I will do what ever it takes to comply with the advise given by the big boys as my business relys on keeping them happy and I know that it will have been logically thought through and has been decided upon by someone much more clever than me. It also makes perfect sense when you apply your own logic too ofcourse.

Hope this helps and thanks again for creating and maintaining so professionally the fantastic Prosepoint software.

Richard Branson

__________________

Richard Branson
- Wellbeing Magazine implemented Prose Point system in November 2009. www.wellbeingmagazine.co.uk
- Thank You to the PP Team

beng
User offline. Last seen 55 min 17 sec ago. Offline
Joined: 27/02/2009
Posts:
...

Hi,

I have a fix for this.

If you're comfortable changing the code on your site, I'd like you to make the change and test for me. If you're not, then let's wait a bit and if there is a ProsePoint release soon, the change will be incorporated into that.

So, if you do want to give this a try, here are instructions:

(I'm presuming you are using ProsePoint 0.28)

You need to replace the entire file .../profiles/prosepoint/modules/prosepoint/prosepoint_editor/pp_img_extract.module on your site.

To do this, visit the link

http://bazaar.launchpad.net/%7Ebengtan/prosepoint/trunk/download/head%3A...

and download it into a file (preferably named pp_img_extract.module). This file should be 8431 bytes in size..

Then replace the file .../profiles/prosepoint/modules/prosepoint/prosepoint_editor/pp_img_extract.module on your site with this new version.

... and let me know how you go.

By default, the alt attribute contains the image title, and the title attribute contains the caption.

This can also be overidden by the theme (for other advanced users), but let's not get too far ahead of ourselves first.

Thank you.

beng
User offline. Last seen 55 min 17 sec ago. Offline
Joined: 27/02/2009
Posts:
Oh, you need to clear your

Oh, you need to clear your site cache afterwards. Otherwise no images will show.

See Clearing the cache to help with common ProsePoint issues

beng
User offline. Last seen 55 min 17 sec ago. Offline
Joined: 27/02/2009
Posts:
ProsePoint 0.29 got released

ProsePoint 0.29 got released just earlier today, and it incorporates a fix for this issue. Please upgrade to 0.29 if you can, and let me know if this issue still persists.

Thank you.

rmbranson
rmbranson's picture
User offline. Last seen 4 days 13 hours ago. Offline
Joined: 20/11/2009
Posts:
Just about to perform my first up grade

Hi Beng,

Thanks you so much for incorporating this fix into the new release.

I will be performing the upgrade asap but as it is my first time doing this I will take it slow and make sure all is backed up first.

I'll feedback my results in due course.

Thanks again Richard

__________________

Richard Branson
- Wellbeing Magazine implemented Prose Point system in November 2009. www.wellbeingmagazine.co.uk
- Thank You to the PP Team

rmbranson
rmbranson's picture
User offline. Last seen 4 days 13 hours ago. Offline
Joined: 20/11/2009
Posts:
Success! Perfect Implementtion

Hi Beng,

Firstly my sinserest apologies for the extremely long delay in getting back to the community with feedback on this issue. (As we all know life sometimes just gets in the way!)

Anyway, I'm am extremely pleased to report that your fix implemented in PP0.29 and brought through to the current version PP0.33 (which I have finally upgraded to) has successfully produced the exact result I was hoping it would achieve.

See the attached to see the Optimization Score of 100% which increased from its previous 92%. Superb

Many thanks to you for maintaining an excellent piece of software and helping those of us who are much less able.

AttachmentSize
Picture 39.png 251.9 KB
__________________

Richard Branson
- Wellbeing Magazine implemented Prose Point system in November 2009. www.wellbeingmagazine.co.uk
- Thank You to the PP Team

beng
User offline. Last seen 55 min 17 sec ago. Offline
Joined: 27/02/2009
Posts:
No problem. Glad to help.

No problem. Glad to help.