[TYPO3-mvc] ImageViewHelper does not create mandatory alt-attribute if it is empty, patch on forge #9151

Franz Ripfel typo3 at abezet.de
Mon Aug 30 15:12:03 CEST 2010


Hi Thomas,

sorry for the long delay, thanks for your input.
You are right, decorating images will _mostly_ be set via CSS. For the  
rest it should still be possible to set an empty alt-tag, i think.
I need to set it, right and good, but nevertheless maybe there are perfect  
reasons to set it empty and still having a valid page.
Its a long way to go till there are only HTML5-Pages...

Well, just my opinion...

Greets
Franz

> Franz Ripfel wrote:
>> Hi,
>>
>> This is an SVN patch request.
>> Type: Bugfix
>>
>> Bugtracker reference:
>> http://forge.typo3.org/issues/9151
>>
>> Problem:
>> The alt-attribute is mandatory for image-tags, empty alt-attributes are
>> quite common, i.e. if your image is just there for layout purposes.
>> Currently the alt-attribute is only rendered if it is not empty.
>> The title-attribute however is always rendered, even if title and alt
>> are empty.
>> IMHO the alt-attribute should always be rendered, is is an mandatory
>> element in the view-helper anyway.
>> The title tag should only be rendered if not empty (filling it with the
>> content of the alt-attribute is nevertheless a good idea).
>>
>>
>>
>> keep rocking!
>> Franz
>
> I thought it's a good idea to force
> the developer/template designer to
> set the alt attribute, even if it's a
> design/layout image.
>
> Usually "decorating" images should be
> used as CSS background images anyway.
>
> So not sure about HTML5 and the alt attribute.
>
> Thomas


More information about the TYPO3-project-typo3v4mvc mailing list