Page MenuHomePhabricator

Watchlist "diff | hist" links are misnested: <DIV> within a <SPAN> is not valid HTML
Closed, ResolvedPublic

Description

The watchlist links diff and hist are mis-nested HTML: they are a <DIV> within a <SPAN>:

<span class="mw-changeslist-line-inner" data-target-page="Wikisource:Scriptorium">  
  <div class="mw-changeslist-links">
    ....links
  </div>
  ....
</span>

This is invalid HTML, since it's a block element inside an inline one. The W3C validator reports this as an Error.

Screenshot_2021-02-19 Showing results for contents of text-input area - Nu Html Checker.png (240×1 px, 26 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Aklapper renamed this task from Watchlist "diff | hist" links are misnested to Watchlist "diff | hist" links are misnested: <DIV> within a <SPAN> is not valid HTML.Feb 20 2021, 11:10 AM

The same goes for the search settings area: mw-advancedSearch-searchPreview and mw-advancedSearch-namespacesPreview.

Spans-in-div outlined in red:

2021-02-20_203313_714x130_screenshot.png (130×714 px, 14 KB)

This appears to be happening with Special:RecentChanges/25 as of today. See https://en.wikipedia.org/w/index.php?title=User:Jonesey95/sandbox&oldid=1199013916 for an example.

Change 993048 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/core@master] Avoid misnesting div in span in OldChangesList

https://gerrit.wikimedia.org/r/993048

Change 993048 merged by jenkins-bot:

[mediawiki/core@master] Avoid misnesting div in span in OldChangesList

https://gerrit.wikimedia.org/r/993048

matmarex assigned this task to Arlolra.