The API sandbox currently uses <dl><dd>description</dd></dl> to indent the parameter descriptions. (mediawiki.special.apisandbox.js)
I know that this is abused on every talk page, but that doesn't make it any better. Instead the description should be indented using CSS and valid HTML.
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Don't use <dd> for indenting descriptions on Special:ApiSandbox | mediawiki/core | master | +9 -9 |
Related Objects
Event Timeline
There's probably not any need for the indenting provided by the <dd>s here at all. But do maintain the separation of items by wrapping each thing that's currently a <dd> in some other block element.
The <span> is the key issue here. It should be a div to allow for semantically correct new elements insertion. Changing from <dl> to other elems, is not a solution.
I tried to change the <span> that contains the <dl><dd>description</dd></dl> into a <div> and the API sandbox remains the same. Is there a page where the abuse takes place so I can try and fix it ?
This is done in resources/src/mediawiki.special/mediawiki.special.apisandbox.js, search for <dd>.
Change 339945 had a related patch set uploaded (by Kosson):
Don't use <dd> for indenting descriptions on Special:ApiSandbox
So, I fixed @Kosson's commit to use block-level elements (e.g. imbricated divs). It might be just me, but I think the indentation looked nicer. Would it be enough to add a new class with margin-left: 1.6em for the outer element?
Comparing the two side by side, I like the version without the extra <dd> whitespace better. The description and info is still indented relative to the field name, just not by quite as much.
Change 339945 merged by jenkins-bot:
Don't use <dd> for indenting descriptions on Special:ApiSandbox