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

          Attachments

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

            Here's one we can fix a bit quicker. I'm slapping this one straight into the next STABLE Sprint.

            I had a look a the current situation and there are labels, but they are not correctly linked to the radio inputs. Here is an example of a current form (made pretty).

            ...
            <form method="POST" action="http://localhost/moodle_testing/mod/choice/view.php" class="horizontal">
            <ul class="choices">
                <li class="option"><input value="65" name="answer" type="radio" /><label for="answer">Red</label></li>
                <li class="option"><input value="66" name="answer" type="radio" /><label for="answer">Green</label></li>
                <li class="option"><input value="67" name="answer" type="radio" /><label for="answer">Blue</label></li>
                <li class="option"><input value="68" name="answer" type="radio" /><label for="answer">Yellow</label></li>
                ...

            Show
            salvetore Michael de Raadt added a comment - Here's one we can fix a bit quicker. I'm slapping this one straight into the next STABLE Sprint. I had a look a the current situation and there are labels, but they are not correctly linked to the radio inputs. Here is an example of a current form (made pretty). ... <form method="POST" action="http://localhost/moodle_testing/mod/choice/view.php" class="horizontal"> <ul class="choices"> <li class="option"><input value="65" name="answer" type="radio" /><label for="answer">Red</label></li> <li class="option"><input value="66" name="answer" type="radio" /><label for="answer">Green</label></li> <li class="option"><input value="67" name="answer" type="radio" /><label for="answer">Blue</label></li> <li class="option"><input value="68" name="answer" type="radio" /><label for="answer">Yellow</label></li> ...
            Hide
            salvetore Michael de Raadt added a comment -

            Hi, Dan.

            I've assigned this to you as the component owner. If you like you can take this through, or leave it to us and it will be done.

            Show
            salvetore Michael de Raadt added a comment - Hi, Dan. I've assigned this to you as the component owner. If you like you can take this through, or leave it to us and it will be done.
            Hide
            andyjdavis Andrew Davis added a comment -

            Looks like a sensible change to me.

            Show
            andyjdavis Andrew Davis added a comment - Looks like a sensible change to me.
            Hide
            ankit_frenz Ankit Agarwal added a comment -

            Thanks Andrew for the review.
            Sending to integration!

            Show
            ankit_frenz Ankit Agarwal added a comment - Thanks Andrew for the review. Sending to integration!
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Ankit this has been integrated now.

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Ankit this has been integrated now.
            Hide
            phalacee Jason Fowler added a comment -

            all good

            Show
            phalacee Jason Fowler added a comment - all good
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            It is late here and I'm very tired but I didn't want to go to sleep before expressing my admiration for your amazing collaboration. Thanks!

            Closing as fixed, heading to zzzZZZzzz, niao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - It is late here and I'm very tired but I didn't want to go to sleep before expressing my admiration for your amazing collaboration. Thanks! Closing as fixed, heading to zzzZZZzzz, niao

              People

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

                Dates

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