Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27843 META: Accessibility compliance for 2.x
  3. MDL-30845

read-only text input fields rendered as plain text and not as a read-only input field

XMLWordPrintable

    • MOODLE_21_STABLE, MOODLE_24_STABLE
    • MOODLE_24_STABLE
    • MDL-30845-master
    • Hide

      Config changes:-

      1. Grant a user following permissions
        ->moodle/course:changefullname
        ->moodle/course:update
      2. Make sure the user doesnt have the following permissions
        Change course ID numbermoodle/course:changeidnumber
        Change course short namemoodle/course:changeshortname
        Change course summarymoodle/course:changesummary

      Test:-

      1. you can set above in a number of ways I just changed the student role from site admin>users>perm>define roles
      2. Now loging as this user and go to a course>edit
      3. Make sure you dont see a static content for fields course id and course short name. Instead its a input field with readonly attribute
      4. Hack the form using a tool of your choice and change the value to something other than the existing one.
      5. submit the form, make sure the hacked value is not submited. (you can print the $data = $editform->get_data() in edit.php to view submitted values)

      Exploratory Testing
      Test as many forms as possible in Moodle. All areas which use mforms widely should be tested. It needs to be tested how JS dependencies are working with frozen and Hardfrozen elements(text ones) as well as how frozen elements behave in general and no regressions are caused.

      Things to test include trying to update the field as role that do not have permissions to do so, selecting/deselecting any checkboxes, testing with javascript turned on and off and removing the read only flag using Firebug always submitting the form to ensuring there are no errors generated.

      Show
      Config changes:- Grant a user following permissions ->moodle/course:changefullname ->moodle/course:update Make sure the user doesnt have the following permissions Change course ID numbermoodle/course:changeidnumber Change course short namemoodle/course:changeshortname Change course summarymoodle/course:changesummary Test:- you can set above in a number of ways I just changed the student role from site admin>users>perm>define roles Now loging as this user and go to a course>edit Make sure you dont see a static content for fields course id and course short name. Instead its a input field with readonly attribute Hack the form using a tool of your choice and change the value to something other than the existing one. submit the form, make sure the hacked value is not submited. (you can print the $data = $editform->get_data() in edit.php to view submitted values) Exploratory Testing Test as many forms as possible in Moodle. All areas which use mforms widely should be tested. It needs to be tested how JS dependencies are working with frozen and Hardfrozen elements(text ones) as well as how frozen elements behave in general and no regressions are caused. Things to test include trying to update the field as role that do not have permissions to do so, selecting/deselecting any checkboxes, testing with javascript turned on and off and removing the read only flag using Firebug always submitting the form to ensuring there are no errors generated.

      When a screen reader encounters a form it enters "forms mode" and the information read by the screen reader might not be what is apparent visually. Moodle regularly renders read-only text within forms as plain text and not as input elements with the readonly attribute set. In forms mode in screen readers, this information will normally be skipped over when the user is browsing through the form because the screen reader does not recognize it as part of the form. Changing the plain text back to an input element with the readonly attribute set will fix this problem.

            ankit_frenz Ankit Agarwal
            gdkraus Greg Kraus
            Rajesh Taneja Rajesh Taneja
            Aparup Banerjee Aparup Banerjee
            Tim Barker Tim Barker
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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