[ZCM] [ZC] 1557/ 2 Accept "border="0" on image tags by default should be removed"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri Oct 29 07:26:43 EDT 2004


Issue #1557 Update (Accept) "border="0" on image tags by default should be removed"
 Status Accepted, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/1557

==============================================================
= Accept - Entry #2 by ajung on Oct 29, 2004 7:26 am

 Status: Pending => Accepted

 Supporters added: ajung


________________________________________
= Request - Entry #1 by limi on Oct 28, 2004 3:38 pm

This is a re-opening of http://collector.zope.org/Zope/1158.

Zope emits <img border="0" /> by default, and you can "override" this by supplying it with an empty border argument.

This is wrong, and breaks validity and accessibility in a lot of sites. The border attribute should be set via CSS, and the only browser that doesn't respect this is Netscape 4. If you have Netscape 4 as a target platform, you have to do lots of workarounds anyway - no need to optimize for this case.

- I propose that Zope does not emit any border tag unless explicitly asked to do so.

Related, Zope still emits the Title variable in both the alt and title attributes. This is wrong, either there needs to be a separate alt variable in the Image object, or the alt attribute should be empty (alt=""). It still needs to be there, even if it's empty. It can be set manually, if required.

The Title should go into the title attribute on the tag, as it already does. Putting it in the alt attribute is wrong, though. Alt text is an alternative representation of the image, and is not the image title.

- My suggestion is that the Image field outputs a blank alt="" attribute by default, and uses the Title variable for the title attribute on the tag.

(If somebody wants to solve this more thoroughly, Image should have a separate alt variable that is output as alt="" if it has no content - and a longdesc variable that is only rendered if it has any content.)

Accessibility Reference for the two issues mentioned above:
http://www.w3.org/TR/WCAG10-CSS-TECHS/#style-rules
http://www.w3.org/TR/WCAG10-CSS-TECHS/#text-not-images

==============================================================



More information about the Zope-Collector-Monitor mailing list