Moodle
  1. Moodle
  2. MDL-42210

Add label for text, textarea and select dropdown input elements in Feedback module

    Details

    • Testing Instructions:
      Hide

      As an administrator:

      1. Enable the feedback module going to the admin tree -> plugins -> activity modules -> Manage activities
      2. Go to a course and add a Feedback activity and then view the activity
      3. Add a "Short text answer" question.
      4. Add a "Longer text answer" question.
      5. Add a "Numeric answer" question.
      6. Add a "Multiple choice" question, selecting the "Multiple choice - single answer allowed (dropdownlist)" for the "Multiple choice type" option.
      7. Add a "Multiple choice (rated)" question, selecting the "Multiple choice (rated) - single answer allowed (dropdownlist)" for the "Multiple choice type" option.

      With Editing Mode ON

      Feedback Form Preview - Click on the field label for each of the fields. Notice that focus is given to the input field. View at the HTML code and notice that the input fields have "label for" tags associating them.

      With Editing Mode OFF

      While viewing the Feedback form, click on the field label for each of the fields. Notice that focus is given to the input field . View at the HTML code and notice that the input fields have "label for" tags associating them.

      In order to make Feedback forms WCAG 2.0 compliant, each input field must have a label associated with it.

      The checkbox and radio type input fields were tested and do not have this issue.

      Show
      As an administrator: Enable the feedback module going to the admin tree -> plugins -> activity modules -> Manage activities Go to a course and add a Feedback activity and then view the activity Add a "Short text answer" question. Add a "Longer text answer" question. Add a "Numeric answer" question. Add a "Multiple choice" question, selecting the "Multiple choice - single answer allowed (dropdownlist)" for the "Multiple choice type" option. Add a "Multiple choice (rated)" question, selecting the "Multiple choice (rated) - single answer allowed (dropdownlist)" for the "Multiple choice type" option. With Editing Mode ON Feedback Form Preview - Click on the field label for each of the fields. Notice that focus is given to the input field. View at the HTML code and notice that the input fields have "label for" tags associating them. With Editing Mode OFF While viewing the Feedback form, click on the field label for each of the fields. Notice that focus is given to the input field . View at the HTML code and notice that the input fields have "label for" tags associating them. In order to make Feedback forms WCAG 2.0 compliant, each input field must have a label associated with it. The checkbox and radio type input fields were tested and do not have this issue.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-42210_master

      Description

      There are several input fields that do not have labels explicitly tied to them:

      • Numeric | numeric
      • Shorter Text field | textfield
      • Longer Text field | textarea
      • Multiple Choice - single answer allowed (dropdownlist) | multichoice
      • Multiple Choice (rated) - single answer allowed (dropdownlist) | multichoicerated

      The first three were missing the "label for" tags completely.

      The multichoice and multichoicerated were only missing a label when using the dropdownlist format as the other formats appear to have been addressed by MDL-34564.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Andreas Grabs added a comment -

            Hi Michael,
            thank you for reporting this. Of course you are right. There should be labels.
            Best regards
            Andreas

            Show
            Andreas Grabs added a comment - Hi Michael, thank you for reporting this. Of course you are right. There should be labels. Best regards Andreas
            Hide
            Michael Milette added a comment -

            Fix for this issue.

            Show
            Michael Milette added a comment - Fix for this issue.
            Hide
            Michael Milette added a comment -

            I've added a link to a fix I created for this issue. This is the first time I've submitted a fix for Moodle on GitHub. Please let me know if I need to do anything else or do something differently.

            Best regards,

            Michael

            Show
            Michael Milette added a comment - I've added a link to a fix I created for this issue. This is the first time I've submitted a fix for Moodle on GitHub. Please let me know if I need to do anything else or do something differently. Best regards, Michael
            Hide
            Andreas Grabs added a comment -

            Hi Michael,
            thank you for the great job
            Best regards
            Andreas

            Show
            Andreas Grabs added a comment - Hi Michael, thank you for the great job Best regards Andreas
            Hide
            Dan Poltawski added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            Damyon Wiese added a comment -

            Thanks Andreas - this has been integrated to 24, 25 and master.

            Note: I got confused by the "Label" field in the question form and what it was for. The help for this field is wrong - can you please fix it in the docs?

            Link to help:

            http://docs.moodle.org/25/en/Building_Feedback

            Also note for Michael: Andreas added a commit to fix the white space in your patch (you introduced tabs). Please configure your editor to always use 4 spaces for indentation.

            Show
            Damyon Wiese added a comment - Thanks Andreas - this has been integrated to 24, 25 and master. Note: I got confused by the "Label" field in the question form and what it was for. The help for this field is wrong - can you please fix it in the docs? Link to help: http://docs.moodle.org/25/en/Building_Feedback Also note for Michael: Andreas added a commit to fix the white space in your patch (you introduced tabs). Please configure your editor to always use 4 spaces for indentation.
            Hide
            Damyon Wiese added a comment -

            Also reworded the testing instructions (we are testing with this patch installed).

            Show
            Damyon Wiese added a comment - Also reworded the testing instructions (we are testing with this patch installed).
            Hide
            Michael Milette added a comment -

            Thank you Damyon for your time, efforts and going the extra step to take the time to some tips share some tips with me. I am always open to such constructive suggestions.

            As requested, I have adjusted the settings in my text editor to avoid the tab issue in the future. Hopefully you won't see anymore tab characters in my code in the future. If you do, let me know.

            I will also write future testing instructions from the perspective of the patch already having been added.

            Thanks again.

            Best regards,

            Michael

            Show
            Michael Milette added a comment - Thank you Damyon for your time, efforts and going the extra step to take the time to some tips share some tips with me. I am always open to such constructive suggestions. As requested, I have adjusted the settings in my text editor to avoid the tab issue in the future. Hopefully you won't see anymore tab characters in my code in the future. If you do, let me know. I will also write future testing instructions from the perspective of the patch already having been added. Thanks again. Best regards, Michael
            Hide
            Damyon Wiese added a comment -

            No problem Michael, thanks again for the patch.

            Show
            Damyon Wiese added a comment - No problem Michael, thanks again for the patch.
            Hide
            Ankit Agarwal added a comment -

            Works as descried.
            Passing.
            Thanks

            Show
            Ankit Agarwal added a comment - Works as descried. Passing. Thanks
            Hide
            Eloy Lafuente (stronk7) added a comment -

            "Aequam memento rebus in arduis servare mentem"

            Many thanks for your hard work, this is now part of "Moodle, the LMS". Closing!

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - "Aequam memento rebus in arduis servare mentem" Many thanks for your hard work, this is now part of "Moodle, the LMS". Closing! Ciao
            Hide
            Michael Milette added a comment -

            Thank you to all whose efforts contributed to integrating this patch into Moodle including:

            Andreas Grabs, Ankit Agarwal, Damyon Wiese, Dan Poltawski, Eloy Lafuente (stronk7)

            Best regards,

            Michael

            PS. Eloy, I'm still trying to translate what you wrote in quotes

            Show
            Michael Milette added a comment - Thank you to all whose efforts contributed to integrating this patch into Moodle including: Andreas Grabs, Ankit Agarwal, Damyon Wiese, Dan Poltawski, Eloy Lafuente (stronk7) Best regards, Michael PS. Eloy, I'm still trying to translate what you wrote in quotes

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: