[Typo3-dev] tslib_content::getAltParam()

Martin T. Kutschker Martin.T.Kutschker at blackbox.net
Mon Mar 22 14:42:16 CET 2004


Hi!

It's a good thing that Typo3 support also the title attribute (if only
for images).

But I'm not happy with two issues. First, I'm unsure about the benefits 
of using strip_tags() on the content since it's protected by 
htmlspecialchars() anyway. It's not necessary and may lead to unexpected 
results.

Second, I'm not convinced that the use-alt-for-title-feature is doing 
any good. It may be convenient for a short period while sites make a 
transition into proper using of title-attributes, but not more. IMHO it 
would be more sensible to use the alt-text as title-text and have an 
empty alt-tag. This saves bandwith and old-style alt-texts should in 
99.9% really be title-texts.

So I'm in favour of the following setup (to let site users have a choice):

Introduce a system flag that determines the alt/title-attribute 
behaviour. The possible values are...

0)

No re-arranging of attributes, alt- and title-attribute are used as set 
and may be empty (only alt="" will be returned).

1)

If the title-attribute is not set, use the value of the alt-attribute, 
and make the alt-attribute empty.

2)

If the title-attribute is not set, use the value of the alt-attribute 
for both alt- and title-attribute.

Masi

PS: Is there any way to set alt and/or title attribute in the BE for 
text w/image or images yet?





More information about the TYPO3-dev mailing list