1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-11 11:23:52 +02:00

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 176a323b4e
commit e9f6b9c2d6

@ -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',