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

Atto produces invalid nested unordered (UL) lists

    XMLWordPrintable

Details

    Description

       Nested lists should be inside a <li> element of the list in which it is nested. At the moment, embedded <ul> tags appear at the same level as the <li> tags instead of inside.

      HTML5 W3C ul spec: HTML5 ul. Note that a <ul> element may contain exactly zero or more <li> elements. 

      Steps to reproduce:

      1. Create a new page or label in Moodle
      2. Click the Atto editor toolbar button to create a bulleted (unordered) list.
      3. Type a few lines of content. A single word will do.
      4. Press the Indent button in the Atto toolbar.
      5. Type a few more lines of content.
      6. Switch to the HTML view.

      Instead of valid HTML similar to this:

      <ul>
          <li>Item 1</li>
          <li>Item 2
              <ul>
                  <li>Item 2.1</li>
              </ul>
          </li></ul>

      Atto is producing this invalid HTML:

      <ul>
          <li>Item 1</li>
          <li>Item 2</li>
          <ul>
             <li>Item 2.1</li>
          </ul>
      </ul>

      What is even worse is that, if you try to fix it, Atto just goes and re-arranges it all back to the way it was.

      This creates an accessibility failure of WCAG 2.1, specifically criterion 4.1.1 Parsing.

      Attachments

        Issue Links

          Activity

            People

              nhanvoht Nhan Vo
              michael-milette Michael Milette
              Tim Hunt Tim Hunt
              Andrew Lyons Andrew Lyons
              Angelia Dela Cruz Angelia Dela Cruz
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              5 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                13/Sep/21

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 20 minutes
                  20m