OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



ALT tags for images

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

ALT tags for images

Postby raghavp » Thu Aug 02, 2007 7:35 pm

I searched the forums for this but couldn't find anything about it, so I thought of asking.

When I upload an image, (in this case on the home page as a "homepage image" in Step 5.), I have no option to enter an ALT="..." tag for image. The image I have has some text that would be useful for blind readers / non-graphical browser users and thus would be something I want to add. Is there any way this can be accomplished?
raghavp
 
Posts: 8
Joined: Wed Jul 18, 2007 8:26 pm

Re: ALT tags for images

Postby asmecher » Fri Aug 03, 2007 9:26 am

Hi raghavp,

Good idea -- I've entered this into Bugzilla. See http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=2968. In the meantime, the easiest way to hack this in is to modify templates/common/header.tpl by hand (particularly if you've only got one journal).

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: ALT tags for images

Postby raghavp » Fri Aug 03, 2007 3:00 pm

I suppose what could be done temporarily is to perhaps make a div called "hidden" or something else and have the corresponding css be "visibility: hidden". Thus non-graphical browsers will see the content but graphical browsers will hide it.
raghavp
 
Posts: 8
Joined: Wed Jul 18, 2007 8:26 pm

Re: ALT tags for images

Postby asmecher » Fri Aug 03, 2007 3:25 pm

Hi raghavp,

If you only have one journal, why not simply hard-code the ALT name into templates/common/header.tpl? If you have multiple journals, a few Smarty {if ...} statements would do the trick. It's a hack, but it'll work until we implement proper ALT tag support for header images.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: ALT tags for images

Postby raghavp » Fri Aug 03, 2007 4:28 pm

Well, actually, the issue is not for the header only in this case; i.e. not only for the logo. I needed to insert an image on the front page for another purpose.

I was thinking something along the lines of that for every image one uploads, a field is present for an alt tag for that image.

Actually, I would be interested in fixing the bug/adding the feature myself. Is there an approach you would take? I'm not terribly familiar with the internal workings of OJS but am familiar with PHP in general. I didn't delve deeply into the database, but I don't see a table or something else about images (except for within articles). Am I mistaken?
raghavp
 
Posts: 8
Joined: Wed Jul 18, 2007 8:26 pm

Re: ALT tags for images

Postby asmecher » Fri Aug 03, 2007 4:56 pm

Hi raghavp,

I'd wait a little while before beginning this kind of change, as we'll be merging in an overhauled metadata and settings storage system soon. This will increase multilingual capabilities (i.e. you'll be able to upload images in multiple languages) and ALT tags should take advantage of this change as well. I expect we'll be able to merge that code into CVS shortly, so if you wait you won't have to play catch-up when the changes are merged in.

Thanks for the offer of contribution! If you're not using CVS yet, I'd suggest trying it out. See docs/README-CVS. When we get the multilingual enhancements merged in, feel free to start tinkering.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: ALT tags for images

Postby raghavp » Wed Aug 08, 2007 6:20 am

Cool. I just checked out CVS. Can't wait to look at the new multilingual code and start hacking.
raghavp
 
Posts: 8
Joined: Wed Jul 18, 2007 8:26 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests