mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
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.
This commit is contained in:
parent
45d99c3807
commit
5a9528b959
1 changed files with 17 additions and 0 deletions
|
@ -89,5 +89,22 @@ class MoodleQuickForm_advcheckbox extends HTML_QuickForm_advcheckbox{
|
|||
}
|
||||
} // 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
|
||||
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue