MDL-70032 qtype_multichoice: Fix answer labelling
commit556648db0bfbc7261355a820ccc36ff5afc01c50
authorJun Pataleta <jun@moodle.com>
Thu, 29 Oct 2020 07:36:15 +0000 (29 15:36 +0800)
committerJun Pataleta <jun@moodle.com>
Thu, 29 Oct 2020 08:22:08 +0000 (29 16:22 +0800)
tree499a2c6620c3c12a42600cbcf2c8013d3b5806af
parentbeff06190a5cc769b467e0d2a8f3cb670200a2bc
MDL-70032 qtype_multichoice: Fix answer labelling

* Discard the use of the label element in order to be able to render
multiple choice answers as they are and have these act as the radio
button/checkbox' label through the aria-labelledby attribute.
* New JS module qtype_multichoice/answers that listens for click events
on the answer text container and selects the appropriate answer radio
button/checkbox.
question/type/multichoice/amd/build/answers.min.js [new file with mode: 0644]
question/type/multichoice/amd/build/answers.min.js.map [new file with mode: 0644]
question/type/multichoice/amd/src/answers.js [new file with mode: 0644]
question/type/multichoice/renderer.php