Last modified: 2013-05-19 12:03:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 33438 - SpecialPreferences: <p> should not be inside <strong>
SpecialPreferences: <p> should not be inside <strong>
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User preferences (Other open bugs)
unspecified
All All
: Low trivial (vote)
: 1.22.0 release
Assigned To: Krinkle
https://translatewiki.net/w/i.php?tit...
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-30 21:22 UTC by Fomafix
Modified: 2013-05-19 12:03 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Fomafix 2011-12-30 21:22:34 UTC
/includes/specials/SpecialPreferences.php contains

$out->wrapWikiMsg(
  "<div class=\"successbox\"><strong>\n$1\n</strong></div><div id=\"mw-pref-clear\"></div>",
  'savedprefs'
);

and generates

<div class="successbox"><strong>
<p>Your preferences have been saved.
</p>
</strong></div>

The strong element http://www.w3.org/TR/html5/text-level-semantics.html#the-strong-element must contain phrasing content http://www.w3.org/TR/html5/content-models.html#phrasing-content. The p element is not allowed.

Solution: Remove strong and add
 .successbox { font-weight: bold; }
Comment 1 Krinkle 2011-12-30 21:26:51 UTC
Or alternatively, parse with option 'inline' instead of default 'block', as is done for other inline messages.
Comment 2 Fomafix 2012-01-04 09:21:56 UTC
The css class successbox is also used in some extensions. Some have the same problem <strong>\n$1\n</strong> or even use explicit <strong><p>.


The <div id="mw-pref-clear"></div> with #mw-pref-clear { clear: both; } is because successbox has a float:left.
mw-pref-clear is only defined in /skins/common/oldshared.css and /skins/modern/main.css by Bug 19759 in r53457 and r54197.

<div id="mw-pref-clear"></div> is not needed anymore because the following mw-prefs-form has already the css class visualClear:

https://translatewiki.net/w/i.php?title=Special:Preferences&success=1&useskin=cologneblue
https://translatewiki.net/w/i.php?title=Special:Preferences&success=1&useskin=standard
https://translatewiki.net/w/i.php?title=Special:Preferences&success=1&useskin=modern


.successbox { float:left } is a bad way to generate a box with intrinsic width. CSS has better possibilities.


Here is a example page with several boxes: https://translatewiki.net/w/docs/uidesign/design.html
Comment 3 Fomafix 2012-05-05 14:07:38 UTC
successbox is not a inline message. It is always a block. The <strong> should be removed.

float:left is only there to generate a box with intrinsic width. This generates other problems like here: https://bugzilla.wikimedia.org/show_bug.cgi?id=28041#c7
The float:left should be removed. Then a lots of clear:both like #mw-pref-clear are unnecessary and can be removed. CSS has better possibilities to generate a box with intrinsic width.
Comment 4 Krinkle 2012-07-25 19:55:20 UTC
(removing 38638 blocker, not related to i18n messages, but to how SpecialPreferences parses the output)
Comment 5 Krinkle 2013-05-03 13:58:08 UTC
Change-Id: If606203218ece5974a956a3d41d5db40f55b2d5c
Comment 6 Krinkle 2013-05-03 13:58:22 UTC
(In reply to comment #5)
> Change-Id: If606203218ece5974a956a3d41d5db40f55b2d5c

Merged.
Comment 7 Fomafix 2013-05-06 14:16:54 UTC
Thanks for fixing the <strong>.

There is still
	float: left;
to generate a box with intrinsic width. But this needs a clear:left in the following element.

With the following definition instead there is no need for a clear:left:
	display: inline-block;
	zoom: 1;
	*display: inline;
Comment 8 Gerrit Notification Bot 2013-05-06 14:35:13 UTC
Related URL: https://gerrit.wikimedia.org/r/62439 (Gerrit Change Ibb9371eecb99b627ba9dfca5b0a60143fbd6f84f)
Comment 9 Bartosz Dziewoński 2013-05-06 14:36:36 UTC
I submitted the above patch to apply this fix. (Keeping this bug closed since it's not really related - the original issue has been fixed.)
Comment 10 spage 2013-05-07 04:53:29 UTC
The fix for this changes the appearance of all forms using {error,success,warning}box, even those like Userlogin and Create account that weren't bolding their contents and don't wish to. I created bug 48197.
Comment 11 Gerrit Notification Bot 2013-05-19 12:03:41 UTC
Related URL: https://gerrit.wikimedia.org/r/64517 (Gerrit Change I0b39138967f2d29d5e50db0a5990d175fcc81a8e)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links