Details

    • Testing Instructions:
      Hide
      1. Login as Admin, goto a course and add a choice activity
      2. view the activity and check the html source of the page.
      3. Make sure you see the id as an attribute to the input field.
      4. Make sure the for attribute of the label filed is same as the id attribute of input field
      5. Example:-

        <input id="choice_1" type="radio" name="answer" value="red" />
        <label for="choice_1">Red</label>

      Show
      Login as Admin, goto a course and add a choice activity view the activity and check the html source of the page. Make sure you see the id as an attribute to the input field. Make sure the for attribute of the label filed is same as the id attribute of input field Example:- <input id="choice_1" type="radio" name="answer" value="red" /> <label for="choice_1">Red</label>
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-30815-master

      Description

      Each input element needs to be explicitly tied to a form label. The correct code looks like the following.

      <input id="choice_1" type="radio" name="answer" value="red" />
      <label for="choice_1">Red</label>
       
      <input id="choice_2" type="radio" name="answer" value="blue" />
      <label for="choice_2">Blue</label>
       
      <input id="choice_3" type="radio" name="answer" value="green" />
      <label for="choice_3">Green</label>

      The key is to have each input element directly attached to a label through a common "id" and "for" attribute.

        Gliffy Diagrams

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Mar/12