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

Atto produces invalid nested unordered (UL) lists

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Waiting for peer review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.5, 3.8.2, 3.9
    • Fix Version/s: None
    • Labels:

      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

              Assignee:
              thinhpham83 Thinh Pham Tien
              Reporter:
              michael-milette Michael Milette
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated: