Selecting task labels should check checkbox

Summary

When checking of checkboxes rendered by the task list, clicking the respective checkbox labels should toggle the checkbox

Steps to reproduce

  1. Open an issue or MR
  2. Create a simple task list in markdown
  3. Save the issue/MR
  4. Attempt to toggle the checkbox by clicking the label

Expected behavior

You should be able to toggle the checkbox by clicking on the label

Actual behaviour

You are not able to toggle the checkbox using the respective label. You are only able to check the checkbox by clicking the checkbox.

Possible fixes

  • Add a label to the checkbox
  • Dynamically add an id to the checkbox so that you can assign the for attribute in the <label>