[TYPO3-core] RFC #8507: Fileadmin: Setting alt attributes and use the locallang.xml files instead of locallang.php files

Rupert Germann rupi at gmx.li
Wed May 13 11:50:58 CEST 2009


Hi Christian,

Christian Kuhn wrote:
> Rupert Germann wrote:
>> a general question: why is it good to have filled alt-attribs when they
>> are only shown if the icon is not found ?
>> (which will be only the case in a broken TYPO3 installation)
>> the little yellow tooltip is filled by the title attrib.
>> or is this different in other browsers?
> 
> Several reasons come to my mind. I have no strong reason, but I think
> they sum up to a "yes, we should add reasonable alt attributes wherever
> possible":
> - Most of the other core code adds alt tags to icons, too (consistency)

yes, they all have alt attribs (since TYPO3 3.6 or so) but these attributes
are mostly empty because the information is already provided by the title
attrib.

> - An empty alt attribute is generally accepted only for pure decorative
> images (well, what is generally accepted?)
> - AFAIK IE6 uses the alt attribute for the tooltip (ie6 is still
> supported in 4.3)

http://davidwalsh.name/6-reasons-why-ie6-must-die

> - Accessibility (well, in the backend ...)
> - It's a mandatory attribute anyway, why not fill it with reasonable
> information?
> 
> The other way round: Why do you think the alt attribute should stay
> empty when we have some information we could easily supply here?

because they make the html source bigger without providing any additional
information. This inforation (e.g. a filename) is already printed several
times to the source.

consider these html lines generated from class-file_list.inc (I stripped the
onclick="" stuff)

before your patch:
....
<td nowrap="nowrap" class="col-icon"><a href="#"...>
    <img src="gfx/fileicons/t3x.gif" width="18" height="16"
    title="T3X_cc_metaexec-0_1_0-z-200603301830.t3x" alt="" /></a></td>

<td nowrap="nowrap" class=""><a href="#"
    title="T3X_cc_metaexec-0_1_0-z-200603301830.t3x"...>
        T3X_cc_metaexec-0_1_0-z-200603301830.t3x</a></td>
....

after applying the patch:
....
<td nowrap="nowrap" class="col-icon"><a href="#"...>
    <img src="gfx/fileicons/t3x.gif" width="18" height="16"
        title="T3X_cc_metaexec-0_1_0-z-200603301830.t3x"
        alt="T3X_cc_metaexec-0_1_0-z-200603301830.t3x" /></a></td>

<td nowrap="nowrap" class=""><a href="#"
    title="T3X_cc_metaexec-0_1_0-z-200603301830.t3x"...>
        T3X_cc_metaexec-0_1_0-z-200603301830.t3x</a></td>
....

result: no new information for the BackEnd user - only more characters in
the html source. Means slower rendering, more server load...

but the situation before your patch is not optimal, too. 
why don't we use the title attribs to provide _additional_ information like
it is done in db_list? 

greets
rupert




More information about the TYPO3-team-core mailing list