MDL-78125 qtype_multianswer: Convert popover trigger to link

According to Boostrap Popovers documentation for popovers triggered
on focus:
"For proper cross-browser and cross-platform behavior, you must use the
<a> tag, not the <button> tag, and you also must include a tabindex
attribute."
This commit is contained in:
Jun Pataleta 2023-05-06 00:03:27 +08:00
parent 063ffc8073
commit df496e57d6

View File

@ -212,8 +212,9 @@ abstract class qtype_multianswer_subq_renderer_base extends qtype_renderer {
return '';
}
return html_writer::tag('button', $icon, [
'type' => 'button',
return html_writer::link('#', $icon, [
'role' => 'button',
'tabindex' => 0,
'class' => 'btn btn-link p-0',
'data-toggle' => 'popover',
'data-container' => 'body',