Skip to content
Permalink
Browse files

applying the same patch to advcheckbox, backported from HEAD - Fixes …

…MDL-8627, "HTML QuickForm displays (some?) disabled elements in a non-accessible way", overrides parent::getFrozenHtml.
  • Loading branch information...
skodak
skodak committed Sep 15, 2007
1 parent 45d99c3 commit 5a9528b959163a7a0462d91b0a443a79c2b7e781
Showing with 17 additions and 0 deletions.
  1. +17 −0 lib/form/advcheckbox.php
@@ -89,5 +89,22 @@ function _generateId()
}
} // end func _generateId
/**
* Returns the disabled field. Accessibility: the return "[ ]" from parent
* class is not acceptable for screenreader users, and we DO want a label.
* @return string
*/
function getFrozenHtml()
{
//$this->_generateId();
$output = '<input type="checkbox" disabled="disabled" id="'.$this->getAttribute('id').'" ';
if ($this->getChecked()) {
$output .= 'checked="checked" />'.$this->_getPersistantData();
} else {
$output .= '/>';
}
return $output;
} //end func getFrozenHtml
}
?>

0 comments on commit 5a9528b

Please sign in to comment.
You can’t perform that action at this time.