Page 1 of 2

ALT vs. TITLE

Posted: Tue 25. Jan 2005, 23:57
by Paal
Hello,

Why not use phpwcms admin mod the TITLE tag instead ALT tag? (in function struct_levellist() ):

include/lib_inc/admin.functions.inc.php line ~322:

FROM

Code: Select all

	$a .= "<img src=\"img/symbole/page_".((!$struct[$key]["acat_hidden"])?1:7).".gif\" width=\"11\" height=\"15\" alt=\"ID:".$struct[$key]["acat_id"];
TO

Code: Select all

	$a .= "<img src=\"img/symbole/page_".((!$struct[$key]["acat_hidden"])?1:7).".gif\" width=\"11\" height=\"15\" title=\"ID:".$struct[$key]["acat_id"];
The more function use correct TITLE tag.
Better for the Firefox browser :)

Tnx, Paul
Ps: phpWCMS-v1.1.9-DEV

Posted: Wed 26. Jan 2005, 16:51
by Pixelchaos
I agree,

The strange thing is: In 1.1 the admin mode used the title-tag for the red page-icons, so it was easy to see what the ID number was. Now that doesn't work anymore.

Posted: Thu 27. Jan 2005, 12:09
by Kosse
You have a point Paal.
Yep TITLE works in IExplorer, Mozilla and Firefox.
To see the ALT function in Firefox you have to go to the properties of the image, which is not the idea of the tag, isn't it?

Yes all the tags ALT in PHPWCMS should be "TITLED", looks cleaner and is more cross-browser friendly.

(even if it is not going to change the world and there are probably better or more important things to do in the 1.9 release, but... what has to be said has to be said :wink: )

Cheers

Posted: Thu 27. Jan 2005, 14:02
by Oliver Georgi
both have to be used: ALT + TITLE

Oliver

Posted: Thu 27. Jan 2005, 14:28
by Peekay
The ALT tag is not intended for visual browsers at all, so it doesn't really matter whether it works in Firefox or IE. The purpose of the tag is to enable the content to be read aloud by assisted-technology browsers used by people who are blind.

As Oliver says, it is good practice to use both tags, (you should use the title tag for links also) but title is not recognised by Lynx the text browser, which is commonly used in conjunction with a screen-reader.

I'm very pleased that PHPWCMS now includes this feature. Until ALT is widely depracated I wouldn't want to see it replaced.

Posted: Thu 27. Jan 2005, 14:38
by Kosse
Okay, ok

you're the Boss :P . I'm not going to troll around here :wink: this forum is a -VERY- good one, I will (am trying to) contribute in a way that honors it. ALT and title attributes (not tags :wink: ) it is then.

To be more specific:

alt is for images
---> works in IE and shows in a flag, works in Mozilla/FF but doesn't display a flag (only shows name in properties)

title (lowercaps) "offers advisory information about the element for which it is set"
---> works both in IE and Mozilla, if you want to disable the flag in IE, just put an ALT and a blank title=""

Basically, you're right Peekay, these attributes are to help accessibility and also to be W3C compliant.

W3C info:
http://www.w3.org/TR/html4/struct/objects.html#adef-alt
http://www.w3.org/TR/html4/struct/globa ... adef-title

:lol:

Posted: Thu 27. Jan 2005, 14:54
by Oliver Georgi
I have implemented a new function getAltTitle($string, $whichAttribute, $echo) that will be used from now on.

The above file is changed ;-)

Oliver

Posted: Thu 27. Jan 2005, 14:59
by Kosse
Oliver,
You are BRILLIANT! (do you shine at night?)
8)

Posted: Thu 27. Jan 2005, 15:56
by Peekay
Apologies if I sounded abrupt Kosse. If you search my posts you'll see I have bemoaned the absence of ALT for some time, so I am just relieved and grateful to see it arrive!. :)

With a little care of the design, PHPWCMS actually works very well in Lynx, even the nav_table_column menu degrades nicely. It has only been the lack of an ability to add image descriptions easily that let it down, so this is a very positive improvement.

Posted: Thu 27. Jan 2005, 16:00
by Kosse
No offence taken, at all :roll:, I was writing my humble answer and when I posted ... saw yours! :wink: so I edited it... you're right all the way. :P

Posted: Thu 27. Jan 2005, 18:45
by Oliver Georgi
Peekay wrote:...has only been the lack of an ability to add image descriptions easily that let it down, so this is a very positive improvement.
There are some enhancement for having image ALT text and link.

Try this in field caption (not working for any image at the moment):

Code: Select all

Caption Text|ALT text|http://www.apple.de _blank
also possible in this way - no caption text for image:

Code: Select all

|ALT text|http://www.apple.de _blank
Oliver

Posted: Mon 7. Feb 2005, 11:08
by cyrano
is this or does an addition extist with 1.1.9 dev release to add also a link to an image when using the content part "images"

i can solve it only when using the caption text and add a link, but i want to use the image directly.

any ideas or linking help helpful.

Thank you.

Posted: Mon 7. Feb 2005, 11:34
by Oliver Georgi
yes - for most images this is done - not image list at the moment.

Oliver

Posted: Mon 7. Feb 2005, 11:39
by cyrano
ok thanx for answer oliver.

Posted: Fri 11. Mar 2005, 08:29
by harrybo
Hello,

is there a patch for Release 1.1-RC4 27-08-2004 that provides the link feature via the caption field?

Regards
Harry