Page MenuHomePhabricator

List embedded in description list <dd> (descriptions) causes LISTGAP issues (old Parser only; does not affect Parsoid)
Open, LowestPublic

Description

Discussion at en.WP VPT, at Anomie's post timestamped at 12:17, 14 May 2019 (UTC), uncovered that an unordered list embedded in the definition lines of a description list will not output a contiguous list, but will instead emit a list broken at each description term. (At least without a workaround).

I haven't tested whether this is true of all lists or some subset of list types.

; Name 1
:* Unordered item of description 1
:* Unordered item 2 of description 1
; Name 2

results in html that looks like:

<dl>
  <dt>Name 1</dt>
  <dd>
    <ul>
      <li>Unordered item of description 1</li>
      <li>Unordered item 2 of description 1</li>
    </ul>
  </dd>
</dl>
<dl>
  <dt>Name 2</dt>
</dl>

when the expected output would be

<dl>
  <dt>Name 1</dt>
  <dd>
    <ul>
      <li>Unordered item of description 1</li>
      <li>Unordered item 2 of description 1</li>
    </ul>
  </dd>
  <dt>Name 2</dt>
</dl>

Event Timeline

@Izno: Please link to a self-contained test case when reporting such issues. Thanks!

It is neither of the two, and I was actually able to close the former--the parser is generally whitespace sensitive.

Ah, I searched for "list gap", but not "LISTGAP". Thanks.

There is one useful addition in my duplicate report: this issue doesn't affect Parsoid, it outputs the expected HTML without a list gap.

Parsoid doesn't have this bug:

[subbu@earth:~/work/wmf/parsoid] php bin/parse.php --normalize < /tmp/wt

<dl>
<dt>Name 1</dt>
<dd>
<ul>
<li>Unordered item of description 1</li>
<li>Unordered item 2 of description 1</li>
</ul>
</dd>
<dt>Name 2</dt>
</dl>
Aklapper renamed this task from List embedded in description list <dd> (descriptions) causes LISTGAP issues to List embedded in description list <dd> (descriptions) causes LISTGAP issues (old Parser only; does not affect Parsoid).Jul 24 2021, 2:28 PM
Aklapper triaged this task as Lowest priority.

Probably a (minor) accessibility issue, since the list is semantically split in several lists.