Page MenuHomePhabricator

Vector is invalid XHTML (empty UL elements)
Closed, DuplicatePublic


Author: fran

As currently running on the English Wikipedia, Vector generates invalid XHTML:

This is a regression from Monobook:

It's invalid because the portlets can be generated with empty UL elements - apparently intended, since the ULs are wrapped in DIVs with the class "emptyPortlet". HTML and XHTML mandate (from HTML 2 onward) that there be at least one LI element inside every UL element.

Version: unspecified
Severity: major



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:05 PM
bzimport added a project: MediaWiki-Interface.
bzimport set Reference to bz23575.
bzimport created this task.May 18 2010, 3:52 AM

ayg wrote:

For the record, this is valid HTML5. Presumably the logic is that it makes no less sense than an empty div, makes authoring marginally easier, and is harmless. We still want to output valid XHTML 1.0, so this should prolly be fixed anyway. Plus it's silly. :)

It's actually not silly at all if you're a script trying to add stuff to that <ul>, and we change the skin so it isn't guaranteed to exist any more.

ayg wrote:

Oddly enough, that's exactly one of the reasons irc:// suggested when I asked why it was valid:

[100518 12:33:03] <AryehGregor> . . . Why is an empty <ul></ul> valid in HTML5?
[100518 12:40:57] <jgraham> AryehGregor: The idea was you might fill it in with script or so later iirc

We could just leave this alone, then. It breaks XHTML1 validation, but will un-break by default when we switch to HTML5.

  • This bug has been marked as a duplicate of bug 23015 ***