No alt tag for images
-
abdussamad
- Regular
- Posts: 117
- Joined: Fri Apr 21, 2006 10:11 pm
- Location: Karachi, Pakistan
- Contact:
No alt tag for images
I think I found a bug in the s9y media manager including the one included with 1.1. The alt tag is not included for images inserted via the media manager. This breaks xhtml validity. Usually this occurs when thumbnails of images linking to the full sized version are inserted.
Abdussamad
Serendipity templates
Serendipity templates
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: No alt tag for images
Hi!
In the serendipity_editor.js, which is responsible for inserting those <img>s there's always an alt tag (even though its empty).
Can you show us an example blog entry where you find this behaviour?
Best regards,
Garvin
In the serendipity_editor.js, which is responsible for inserting those <img>s there's always an alt tag (even though its empty).
Can you show us an example blog entry where you find this behaviour?
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
abdussamad
- Regular
- Posts: 117
- Joined: Fri Apr 21, 2006 10:11 pm
- Location: Karachi, Pakistan
- Contact:
Re: No alt tag for images
I think the alt attribute to the img tag is missing:garvinhicking wrote:Hi!
In the serendipity_editor.js, which is responsible for inserting those <img>s there's always an alt tag (even though its empty).
Can you show us an example blog entry where you find this behaviour?
Best regards,
Garvin
http://cricketgame.info/archives/8-testing-s9y.html
http://validator.w3.org/check?verbose=1 ... g-s9y.html
Abdussamad
Serendipity templates
Serendipity templates
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: No alt tag for images
Hi!
Are you using the WYSIWYG editor to insert this link? It might be that the editor is stripping empty tags?!
Best regards,
Garvin
Are you using the WYSIWYG editor to insert this link? It might be that the editor is stripping empty tags?!
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
abdussamad
- Regular
- Posts: 117
- Joined: Fri Apr 21, 2006 10:11 pm
- Location: Karachi, Pakistan
- Contact:
Re: No alt tag for images
Yeah I think your right. IF I use the standard editor the alt attribute is there. So I guess the media manager should specify some alt text? Perhaps the path to the image or the file name?garvinhicking wrote:Hi!
Are you using the WYSIWYG editor to insert this link? It might be that the editor is stripping empty tags?!
Best regards,
Garvin
Abdussamad
Serendipity templates
Serendipity templates
-
carl_galloway
- Regular
- Posts: 1331
- Joined: Sun Dec 04, 2005 5:43 pm
- Location: Andalucia, Spain
- Contact:
As we move forward to v1.2 I'd like to see a title for the image which can be automatically inserted into the alt field. Some users wouldn't give their images a title but abdussamad's suggestion of using the file name is worth considering. Can we also add a title and description for the folders within the uploads directory? I know this has been mentioned somewhere else but I can't find it right now.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Specifying an ALT/Title-Attribute is a good request, but it's rather painfully to implement and might take a while.
Implementing "path" properties is even more painful, as we need to create a completely new table for that and change all queries that are related to path permissions.
Most of the work on the 1.1 gallery was sponsored by a customer, and since he doesn't need those features, chances are it might take me a longer time to find free time for implementing them.
Best regards,
Garvin
Specifying an ALT/Title-Attribute is a good request, but it's rather painfully to implement and might take a while.
Implementing "path" properties is even more painful, as we need to create a completely new table for that and change all queries that are related to path permissions.
Most of the work on the 1.1 gallery was sponsored by a customer, and since he doesn't need those features, chances are it might take me a longer time to find free time for implementing them.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
abdussamad
- Regular
- Posts: 117
- Joined: Fri Apr 21, 2006 10:11 pm
- Location: Karachi, Pakistan
- Contact:
Well something is better than nothing and so a small change to serendipity_editor.js results in the path to the image file being set as the alt text (s9y1.1 lines 210-218):
In case anybody is interested you can download the file for s9y1.1 here. For 1.0 here
Code: Select all
if (f['serendipity[align]'][0].checked == true) {
img = "<!-- s9ymdb:" + imgID + " --><img width='" + imgWidth + "' height='" + imgHeight + "' " + (styled ? 'style="border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + '\" alt=\"' +img +'\" />';
} else if (f['serendipity[align]'][1].checked == true) {
img = "<!-- s9ymdb:" + imgID + " --><img width='" + imgWidth + "' height='" + imgHeight + "' " + (styled ? 'style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + '\" alt=\"' +img +'\" />';
floating = 'left';
} else if (f['serendipity[align]'][2].checked == true) {
img = "<!-- s9ymdb:" + imgID + " --><img width='" + imgWidth + "' height='" + imgHeight + "' " + (styled ? 'style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + '\" alt=\"' +img +'\" />';
floating = 'right';
}
Abdussamad
Serendipity templates
Serendipity templates
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
No volunteers yet showed up for implementing this. The code foundation etc. is all there, it can be solved with a plugin.
Regards,
Garvin
No volunteers yet showed up for implementing this. The code foundation etc. is all there, it can be solved with a plugin.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
julianhopkins
- Regular
- Posts: 17
- Joined: Tue Mar 18, 2008 4:07 am
- Location: Malaysia
- Contact:
Re: No alt tag for images
Hi, sorry if this is a dumb question, but is there any way to put in ALT text manually? Is it in the image properties?
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: No alt tag for images
It is not a dumb question. If you are using the wysiwyg editor, there is a button that looks like a page with < > on top of it... this toggles between wysiwyg and html model... toggle it to html mode and you can enter the ALT text manually.julianhopkins wrote:Hi, sorry if this is a dumb question, but is there any way to put in ALT text manually? Is it in the image properties?
=Don=
-
julianhopkins
- Regular
- Posts: 17
- Joined: Tue Mar 18, 2008 4:07 am
- Location: Malaysia
- Contact:
Re: No alt tag for images
OK got it
Thanks! So basically, I just enter it in every time I am putting a picture into my post.
For anyone out there who, like me, wasn't sure where the proper place was to put the alt tag, here is an example (the alt tag text in red)
For anyone out there who, like me, wasn't sure where the proper place was to put the alt tag, here is an example (the alt tag text in red)
<img class="serendipity_image_center" width="466" height="300" src="/uploads/jh_pic_090227_BombGaza.jpg" alt="Unexploded bomb in Gaza" />
Re: No alt tag for images
I really would LOVE the possibility to enter the alt tag in the mediamanager 
Author von Dresden für Kinder