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

Read-only selects have orphan labels

    • MOODLE_500_STABLE
    • MDL-85773-main
    • Hide

      WAVE must be used to follow the test instructions: https://wave.webaim.org/extension/ 

      Since there are no read-only tags/autocomplete elements in Moodle, a patch is used to freeze the interests lists in the profile edit page.

      1. Don't switch branch yet
      2. Log in as admin
      3. Navigate to Preferences -> Edit profile
      4. Expand the "Interests" section
      5. Add a few interests
      6. Save changes
      7. Download 85773.patch and apply the patch locally:
        1. git apply <DIR>/85773.patch
          

      1. Reload the Edit profile page
      2. Expand the "Interests" section
      3. Confirm the interests are read-only
      4. Scan the page with WAVE (right-click and "WAVE this page")
      5. Confirm you get an "Orphaned form label" alert for the "List of interests" element
      6. Switch to the branch with the fix
      7. The previous patch must still be applied for the next steps
      8. Reload the Edit profile page
      9. Expand the "Interests" section
      10. Confirm the interests are read-only
      11. Scan the page with WAVE
      12. Confirm there is no longer an "Orphaned form label" alert for the "List of interests" element
      Show
      WAVE must be used to follow the test instructions: https://wave.webaim.org/extension/   Since there are no read-only tags/autocomplete elements in Moodle, a patch is used to freeze the interests lists in the profile edit page. Don't switch branch yet Log in as admin Navigate to Preferences -> Edit profile Expand the "Interests" section Add a few interests Save changes Download 85773.patch and apply the patch locally: git apply <DIR>/ 85773 .patch Reload the Edit profile page Expand the "Interests" section Confirm the interests are read-only Scan the page with WAVE (right-click and "WAVE this page") Confirm you get an "Orphaned form label" alert for the "List of interests" element Switch to the branch with the fix The previous patch must still be applied for the next steps Reload the Edit profile page Expand the "Interests" section Confirm the interests are read-only Scan the page with WAVE Confirm there is no longer an "Orphaned form label" alert for the "List of interests" element
    • Hide

      Code verified against automated checks.

      Checked MDL-85773 using repository: https://github.com/sebastsg/moodle.git

      More information about this report

      Built on: Fri Jun 13 09:56:21 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-85773 using repository: https://github.com/sebastsg/moodle.git main (0 errors / 0 warnings) [branch: MDL-85773-main | CI Job ] More information about this report Built on: Fri Jun 13 09:56:21 UTC 2025
    • Show
      Launching automatic jobs for branch MDL-85773 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/19694/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/67343/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/67344/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/67345/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/67346/ App tests (stable app version) Built on: Fri Jun 13 16:30:15 UTC 2025

      This was fixed in MDL-74814 for selectgroups, but this is still a problem for select, tags, and autocomplete - possibly others.

      The necessary change is to add this to export_for_template in the MoodleQuickForm_select class.

      $context['staticlabel'] = $this->_flagFrozen;

       

       
       

        1. screenshot-2.png
          screenshot-2.png
          172 kB
        2. screenshot-1.png
          screenshot-1.png
          194 kB
        3. 85773.patch
          0.7 kB

            sebastian.gundersen@moodle.com Sebastian Gundersen
            sebastian.gundersen@moodle.com Sebastian Gundersen
            Alberto Sempreboni Alberto Sempreboni
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 53 minutes
                3h 53m

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