Bug #16116
closedAccessibility error: input type="image"
0%
Description
class.tslib_content.php :: function FORM
line 1857 - submit button generation
$image=$this->IMAGE($conf['image.']); .... if($image) { $fieldCode = str_replace('<img','<input type="image"'.$addParams.' name="'.$confData['fieldname'].'"' ,$image);
it is completele wrong. "input" tag doesn't have height, width and border attributes.
(issue imported from #M3397)
Files
Updated by Karsten Dambekalns over 18 years ago
It would probably be better to use IMG_RESOURCE...
Updated by Administrator Admin over 18 years ago
The patch gave me errors, so I had to change the code a bit :
case 'submit':
$value=trim($parts2);
if ($conf['image.']) {
$this->data[$this->currentValKey]=$value;
/*$image=$this->IMAGE;
} else $image='';
if($image) {
$fieldCode = str_replace('<img','<input type="image"'.$addParams.' name="'.$confData['fieldname'].'"' ,$image);
*/
$image=$this->IMG_RESOURCE($conf['image.']);
} else {
$image='';
}
if ($image) {
$fieldCode=sprintf('<input type="image" name="%s"'.$elementIdAttribute.' src="%s"'.$addParams.' />', $confData['fieldname'],$image);
} else {
$fieldCode=sprintf('<input type="submit" name="%s"'.$elementIdAttribute.' value="%s"'.$addParams.' />',
$confData['fieldname'], t3lib_div::deHSCentities(htmlspecialchars($value)));
}
break;