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

Atto produces invalid nested ordered (OL) lists

    XMLWordPrintable

    Details

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

      Description

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

      HTML5 W3C ol spec:  HTML5 ol. Note that an <ol> 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 numbered (ordered) 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:

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

      Atto is producing this invalid HTML:

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

      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

          Activity

            People

            Assignee:
            Unassigned
            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:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated: