MDL-5311 qtype_multichoice: replace label to a for clean button

To avoid behat errors with Firefox, the 'Clean my choice' has been
changed from label to link (with role button).
This commit is contained in:
Sara Arjona 2019-04-30 17:54:23 +02:00 committed by Eloy Lafuente (stronk7)
parent 30513f9740
commit d5e084bcb6
4 changed files with 5 additions and 5 deletions

View File

@ -300,8 +300,8 @@ class qtype_multichoice_single_renderer extends qtype_multichoice_renderer_base
}
// Adds an hidden radio that will be checked to give the impression the choice has been cleared.
$clearchoiceradio = html_writer::empty_tag('input', $clearchoiceradioattrs);
$clearchoiceradio .= html_writer::tag('label', get_string('clearchoice', 'qtype_multichoice'),
['for' => $clearchoiceid]);
$clearchoiceradio .= html_writer::link('', get_string('clearchoice', 'qtype_multichoice'),
['for' => $clearchoiceid, 'role' => 'button']);
// Now wrap the radio and label inside a div.
$result = html_writer::tag('div', $clearchoiceradio, ['id' => $clearchoicefieldname, 'class' => $cssclass]);

View File

@ -312,7 +312,7 @@ body.path-question-type {
}
.qtype_multichoice_clearchoice {
padding-top: 10px;
label {
a {
cursor: pointer;
text-decoration: underline;
padding-left: 30px;

View File

@ -14030,7 +14030,7 @@ body.path-question-type {
.qtype_multichoice_clearchoice {
padding-top: 10px; }
.qtype_multichoice_clearchoice label {
.qtype_multichoice_clearchoice a {
cursor: pointer;
text-decoration: underline;
padding-left: 30px; }

View File

@ -14281,7 +14281,7 @@ body.path-question-type {
.qtype_multichoice_clearchoice {
padding-top: 10px; }
.qtype_multichoice_clearchoice label {
.qtype_multichoice_clearchoice a {
cursor: pointer;
text-decoration: underline;
padding-left: 30px; }