MDL-34650 - accessibility compliance: Add <label> for form input text and select tag
This commit is contained in:
@@ -714,6 +714,11 @@ class single_select implements renderable {
|
||||
*/
|
||||
var $label = '';
|
||||
|
||||
/**
|
||||
* @var array Button label's
|
||||
*/
|
||||
var $labelattributes = array();
|
||||
|
||||
/**
|
||||
* @var string Form submit method post or get
|
||||
*/
|
||||
@@ -806,9 +811,12 @@ class single_select implements renderable {
|
||||
* Sets select's label
|
||||
*
|
||||
* @param string $label
|
||||
* @param array $attributes (optional)
|
||||
*/
|
||||
public function set_label($label) {
|
||||
public function set_label($label, $attributes = array()) {
|
||||
$this->label = $label;
|
||||
$this->labelattributes = $attributes;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -850,6 +858,11 @@ class url_select implements renderable {
|
||||
*/
|
||||
var $label = '';
|
||||
|
||||
/**
|
||||
* @var array Button label's attributes
|
||||
*/
|
||||
var $labelattributes = array();
|
||||
|
||||
/**
|
||||
* @var string Wrapping div class
|
||||
*/
|
||||
@@ -922,9 +935,11 @@ class url_select implements renderable {
|
||||
* Sets select's label
|
||||
*
|
||||
* @param string $label
|
||||
* @param array $attributes (optional)
|
||||
*/
|
||||
public function set_label($label) {
|
||||
public function set_label($label, $attributes = array()) {
|
||||
$this->label = $label;
|
||||
$this->labelattributes = $attributes;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user