ALT vs. TITLE

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Paal
Posts: 204
Joined: Wed 6. Oct 2004, 19:54
Location: Budapest, Hungary
Contact:

ALT vs. TITLE

Post 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
Pixelchaos
Posts: 17
Joined: Wed 25. Aug 2004, 14:04
Contact:

Post 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.
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9840
Joined: Fri 3. Oct 2003, 22:22
Location: Europe 🇩🇪 🇷🇺
Contact:

Post by Oliver Georgi »

both have to be used: ALT + TITLE

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

Post 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.
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post 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:
User avatar
Oliver Georgi
Site Admin
Posts: 9840
Joined: Fri 3. Oct 2003, 22:22
Location: Europe 🇩🇪 🇷🇺
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post by Kosse »

Oliver,
You are BRILLIANT! (do you shine at night?)
8)
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

Post 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.
User avatar
Kosse
Posts: 1066
Joined: Thu 9. Sep 2004, 12:08
Location: Brussels, Belgium
Contact:

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9840
Joined: Fri 3. Oct 2003, 22:22
Location: Europe 🇩🇪 🇷🇺
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post 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.
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
User avatar
Oliver Georgi
Site Admin
Posts: 9840
Joined: Fri 3. Oct 2003, 22:22
Location: Europe 🇩🇪 🇷🇺
Contact:

Post by Oliver Georgi »

yes - for most images this is done - not image list at the moment.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post by cyrano »

ok thanx for answer oliver.
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
harrybo
Posts: 23
Joined: Wed 2. Feb 2005, 16:27

Post 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
Post Reply