Skip to content

Commit

Permalink
MDL-78125 qtype_multianswer: Convert popover trigger to link
Browse files Browse the repository at this point in the history
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."
  • Loading branch information
junpataleta committed May 12, 2023
1 parent 9deb29c commit 63ae4b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions question/type/multianswer/renderer.php
Expand Up @@ -212,8 +212,9 @@ protected function get_feedback_image(string $icon, string $feedbackcontents): s
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',
Expand Down

0 comments on commit 63ae4b4

Please sign in to comment.