Commit b0af8469 authored by Shamim Rezaie's avatar Shamim Rezaie
Browse files

MDL-69116 qtype_mutichoice: Use label for the "clear my choice" link

parent 38abfb6a
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -25,7 +25,7 @@ define(['jquery', 'core/custom_interaction_events'], function($, CustomEvents) {
var SELECTORS = {
CHOICE_ELEMENT: '.answer input',
LINK: 'a',
LINK: 'label',
RADIO: 'input[type="radio"]'
};
......
......@@ -306,7 +306,7 @@ 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::link('', get_string('clearchoice', 'qtype_multichoice'),
$clearchoiceradio .= html_writer::tag('label', get_string('clearchoice', 'qtype_multichoice'),
['for' => $clearchoiceid, 'role' => 'button', 'tabindex' => $linktabindex,
'class' => 'btn btn-link ml-4 pl-1 mt-2']);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment