Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70032

Invalid div under labels in multichoice answers

XMLWordPrintable

    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • MDL-70032-master-2
    • Hide
      Rerun test from MDL-68761

      Please test this in browsers Chrome, Firefox, Safari and IE / Edge

      1. Login as Admin
      2. Create a new Quiz and add a multiple choice question
      3. For choice 1 add and image
      4. For choice 2 add a paragraph of text
      5. For choice 3 add an audio file
      6. For choice 4 add a single word
      7. Preview / Attempt the quiz
      8. Verify the checkboxes, labels (a., b., c.) and the question content all align to the top. See sample expected output:
      HTML Validation
      1. View the page source, copy it and paste it on Nu HTML Validator (selecting "Check by source").
      2. Confirm that you don't get any errors related to the radio button and label of the answers.
      Axe
      1. Run the axe tool on the quiz page with the multiple-choice question.
      2. Confirm that you don't get any accessibility violations related to the radio button and label of the answers.
      Show
      Rerun test from MDL-68761 Please test this in browsers Chrome, Firefox, Safari and IE / Edge Login as Admin Create a new Quiz and add a multiple choice question For choice 1 add and image For choice 2 add a paragraph of text For choice 3 add an audio file For choice 4 add a single word Preview / Attempt the quiz Verify the checkboxes, labels (a., b., c.) and the question content all align to the top. See sample expected output: HTML Validation View the page source, copy it and paste it on Nu HTML Validator  (selecting "Check by source"). Confirm that you don't get any errors related to the radio button and label of the answers. Axe Run the axe tool on the quiz page with the multiple-choice question. Confirm that you don't get any accessibility violations related to the radio button and label of the answers.

      The label element for a choice option contains a div that contains the question which is not allowed as per specifications.

      To reproduce:

      1. Create a multi-choice question
      2. Preview the question
      3. View the page source, copy it and paste it on Nu HTML Validator.
      4. Expected
        • Validation passes
      5. Actual
        • The following errors are encountered:

          Error: Element div not allowed as child of element label in this context. (Suppressing further errors from this subtree.)
           
          From line 530, column 338; to line 530, column 365
           
          a. </span><div class="flex-fill ml-1"><p>Nov
           
          Contexts in which element div may be used:
          Where flow content is expected.
          As a child of a dl element.
          Content model for element label:
          Phrasing content, but with no descendant labelable elements unless it is the element's labeled control, and no descendant label elements.
          

            jpataleta Jun Pataleta
            jpataleta Jun Pataleta
            Mihail Geshoski Mihail Geshoski
            Victor Déniz Falcón Victor Déniz Falcón
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 3 hours, 5 minutes
                1d 3h 5m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.