Page MenuHomePhabricator

Gadgets tab on Special:Preferences badly formatted
Open, LowPublic

Description

The Gadgets tab on Special:Preferences is badly formatted.

  1. Section headers are <h1> instead of <h2>
  1. There is absolutely no need to wrap it in the table at all, however, if by any chance there would be any need (which?), then don't output unnecessary <td class="mw-label"><label>&nbsp;</label></td>

at the beginning which causes ugly left padding of the entire content except for the header.

Feel free to split this to two bugs if necessary.


URL: http://test2.wikipedia.org/wiki/Special:Preferences

Details

Reference
bz44231

Related Objects

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:32 AM
bzimport added a project: Gadgets.
bzimport set Reference to bz44231.
bzimport added a subscriber: Unknown Object (MLST).
Danny_B created this task.Jan 22 2013, 5:10 AM
  1. <label> can contain only inline elements, however, gadget description allows to make block content (typically with longer description divided into paragraphs) thus the HTML output in such case is invalid. Because gadget descriptions should be descriptive, the <label> element should be removed in favour of that. On top of this, the checkbox and the description should be in separated table cells, thus the block level description won't start under the checkbox but aside it.
Krinkle set Security to None.
Krinkle removed subscribers: Unknown Object (MLST), Krinkle.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 22 2016, 3:50 PM
Haritha28 claimed this task.Feb 2 2016, 3:26 PM
Haritha28 added a subscriber: Haritha28.

Change 271468 had a related patch set uploaded (by Haritha28):
Gadgets tab on Special: Preferences badly formatted

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

Danny_B moved this task from Backlog to Doing on the good first bug board.Feb 18 2016, 3:34 PM
TheDJ added a subscriber: TheDJ.Feb 21 2016, 7:50 PM

There is absolutely no need to wrap it in the table at all, however, if by any chance there would be any need (which?), then don't output unnecessary <td class="mw-label"><label>&nbsp;</label></td>

That's not entirely true. The reason it was wrapped in a table, is because tables are the only elements supporting table layout, which is very helpful if the information you are trying to display needs tabular restrictions, which is what HTMLForm does. Since older versions of IE are still 'basically' supported, and thus 'basically' require still usable CSS, whoever makes fundamental changes to this, will have to test on very old browsers to see if users will still be able to do basic interactions (though not necessarily pretty).

The non-breaking space has been in there for a long time (at least way before 2009). The reason for it is not entirely clear to me, but it might have had something to do with how certain older browsers dealt with empty table cells. Or older versions of Tidy.. not sure.

I suggest removing it from GadgetHooks.php and at the same time also removing the empty label element from the html generator, if there is no 'label' in the config.

There is absolutely no need to wrap it in the table at all, however, if by any chance there would be any need (which?), then don't output unnecessary <td class="mw-label"><label>&nbsp;</label></td>

That's not entirely true. The reason it was wrapped in a table, is because tables are the only elements supporting table layout, which is very helpful if the information you are trying to display needs tabular restrictions, which is what HTMLForm does. Since older versions of IE are still 'basically' supported, and thus 'basically' require still usable CSS, whoever makes fundamental changes to this, will have to test on very old browsers to see if users will still be able to do basic interactions (though not necessarily pretty).

Have you checked the code to see what is being told about? ;-)

<table class="mw-htmlform-nolabel" id="mw-htmlform-gadgets">
	<tbody>
		<tr>
			<td colspan="2">... (description header) ...</td>
		</tr>
		<tr class="mw-htmlform-field-HTMLMultiSelectField">
			<td class="mw-label"><label>&#160;</label></td>
			<td class="mw-input">
				... (list of gadgets in form of "content ::= (h1 div+)+" ) ...
			</td>
		</tr>
	</tbody>
</table>

not even speaking about current

table.mw-htmlform-nolabel td.mw-label {
	display: none;
}

So there is no need to have it in table, because it is in fact single column, no table data at all, thus it should be wrapped in <div> (or more semantic tag).

The non-breaking space has been in there for a long time (at least way before 2009). The reason for it is not entirely clear to me, but it might have had something to do with how certain older browsers dealt with empty table cells. Or older versions of Tidy.. not sure.

Perhaps, however, in this particular case (see above) is not needed at all.

I suggest removing it from GadgetHooks.php and at the same time also removing the empty label element from the html generator, if there is no 'label' in the config.

Change 271468 abandoned by Haritha28:
Gadgets tab on Special: Preferences badly formatted

Reason:
While pushing another patch, path conflict occured

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

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptJun 11 2016, 6:41 PM
Aklapper moved this task from Doing to Backlog on the good first bug board.Oct 16 2017, 2:39 PM
Framawiki moved this task from Backlog to Doing on the good first bug board.Dec 2 2017, 1:29 PM
matej_suchanek removed Haritha28 as the assignee of this task.Jan 18 2019, 2:12 PM
matej_suchanek removed a project: Patch-For-Review.
matej_suchanek updated the task description. (Show Details)