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

Moving a section with drag an drop adds unnecessary aria labels

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • Hide
      1. Create a new Topics format course with at least two sections.
      2. Turn editing on.
      3. Inspect the HTML for Topic 1.
      4. Verify the li element with id "section-1" does have an attribute "aria-labelledby"
      5. Verify the li element with id "section-1" has no attribute "aria-label".
      6. Drag and drop Topic 1 after Topic 2.
      7. Inspect the HTML for the new Topic 1.
      8. Verify the li element with id "section-1" still does have an attribute "aria-labelledby"
      9. Verify the li element with id "section-1" still has no attribute "aria-label". [This will fail before the patch.]
      10. Set Course settings > Course format > Format to "Weekly format", and save.
      11. Inspect the HTML for the first week.
      12. Verify the li element with id "section-1" does have an attribute "aria-labelledby"
      13. Verify the li element with id "section-1" has no attribute "aria-label".
      14. Drag and drop the first week after the second week.
      15. Inspect the HTML for the new first week.
        Verify the li element with id "section-1" still does have an attribute "aria-labelledby"
        Verify the li element with id "section-1" still has no attribute "aria-label". [This will fail before the patch.]
      Show
      Create a new Topics format course with at least two sections. Turn editing on. Inspect the HTML for Topic 1. Verify the li element with id "section-1" does have an attribute "aria-labelledby" Verify the li element with id "section-1" has no attribute "aria-label". Drag and drop Topic 1 after Topic 2. Inspect the HTML for the new Topic 1. Verify the li element with id "section-1" still does have an attribute "aria-labelledby" Verify the li element with id "section-1" still has no attribute "aria-label". [This will fail before the patch.] Set Course settings > Course format > Format to "Weekly format", and save. Inspect the HTML for the first week. Verify the li element with id "section-1" does have an attribute "aria-labelledby" Verify the li element with id "section-1" has no attribute "aria-label". Drag and drop the first week after the second week. Inspect the HTML for the new first week. Verify the li element with id "section-1" still does have an attribute "aria-labelledby" Verify the li element with id "section-1" still has no attribute "aria-label". [This will fail before the patch.]

      FULL STEPS

      In Moodle 3.9 or later, in topics or weekly format, with editing on, use web browser's HTML inspector on a section, noting that no aria-label property is present.  (These were removed in favour of aria-labelledby.)  Drag and drop the section to move it.  Using web browser's HTML inspector again, note that an aria-label property has been added.

       

      THE FIX

      In course/format/topics/format.js (and the weeks format) function process_sections() remove the update to aria-label.

       

      THE CAUSE
      With MDL-68189, in course/format/renderer.php function section_header() the use of aria-label was replaced with aria-labelledby, but the update to aria-label was not removed.

            james-cnz James E. Calder
            james-cnz James E. Calder
            Ferran Recio Ferran Recio
            Jun Pataleta Jun Pataleta
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 19 minutes
                1h 19m

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