Project

General

Profile

Actions

Feature #14554

closed

XHTML compliance of img tags: should be border="0" for 1.0 transitional and removed (!) for 1.0 strict/1.1

Added by Simon Ihmig over 19 years ago. Updated almost 18 years ago.

Status:
Closed
Priority:
Should have
Category:
Frontend
Target version:
-
Start date:
2005-02-15
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Pages with images in it fail to validate against XHTML 1.0 strict because of the border="0" attribute in <img> tags, which is considered deprecated.

A config option to disable this output with all parts of TYPO3 that produce image code (cObj IMAGE, GMENU...) would be nice, maybe even an automatic solution when config.doctype=xhmtl_strict is set.

(issue imported from #M797)


Files

0000797-class.tslib_content.php.diff (6.73 KB) 0000797-class.tslib_content.php.diff Administrator Admin, 2005-03-29 15:09

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #14686: IMAGE object border propertyClosed2005-04-19

Actions
Actions #1

Updated by Sacha Vorbeck about 19 years ago

keyword:accessibility

Actions #2

Updated by Martin Kutschker about 19 years ago

The border attribute has been removed from XHTML 1.1.

Actions #3

Updated by Andreas Schwarzkopf about 19 years ago

The border attribute has also been removed from XHTML 1.0 strict (not deprecated!)

Actions #4

Updated by Rupert Germann about 19 years ago

the atached patch adds a new function to class.tslib_content.php which returns only a border attribute for images if the doctype is not xhtml_strict, xhtml_11 or xhtml_2 or if the config parameter 'disableImgBorderAttr' is not set.

example: config.disableImgBorderAttr=1
will disable border attributes in img tags even if the doctype is not in the list of doctypes which will automatically prevent the use of border attribs.

Actions #5

Updated by Martin Kutschker about 19 years ago

I'm preparing a patch that stores in $TSFE->xhtmlDoctype the actual doctype and in $TSFE->xhtmlVersion the version number (1.0, 1.1, ..).

I hope to get it into the core. So please wait a bit before anybode checks this patch in.

Actions #6

Updated by Rupert Germann about 19 years ago

fixed in cvs:
  • fix for bug 797: added a new function to class.tslib_content.php (getBorderAttr()) which returns only a border attribute for images if the doctype is not xhtml_strict, xhtml_11 or xhtml_2 or if the config parameter 'disableImgBorderAttr' is not set.
    Setting 'disableImgBorderAttr' to '1' will disable border attributes in <img> tags even if the doctype is not in the list of doctypes above.
Actions

Also available in: Atom PDF