Last modified: 2013-10-04 13:58:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56729, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54729 - Restrict <abbr> formatting to where a title attribute is present
Restrict <abbr> formatting to where a title attribute is present
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.22.0
All All
: Low enhancement (vote)
: ---
Assigned To: entlinkt
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-28 01:05 UTC by entlinkt
Modified: 2013-10-04 13:58 UTC (History)
2 users (show)

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


Attachments

Description entlinkt 2013-09-28 01:05:02 UTC
The rule currently present in shared.css

abbr,
acronym,
.explain {
	border-bottom: 1px dotted;
	cursor: help;
}

should become

abbr[title],
.explain[title] {
	border-bottom: 1px dotted;
	cursor: help;
}

Reasoning:

* It does not make sense to draw attention to an <abbr> element that doesn't have a title attribute because there is nothing special to see there.
* It matches Gecko's default stylesheet (http://mxr.mozilla.org/mozilla-central/source/layout/style/html.css) and the HTML5 style (http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#phrasing-content-1).
* It does not negatively impact compatibility, as far as I know (IE 6 does not support the [title] selector, but does not support the <abbr> element either).
* <acronym> elements are currently not allowed and won't be because they are non-conforming in HTML5 (cf. bug 671, comment 37), so this part of the rule can be dropped.
Comment 1 Bartosz Dziewoński 2013-09-28 11:49:25 UTC
[[mw:Developer access]]. Get it and submit patches directly! :)

(In reply to comment #0)
> * It does not negatively impact compatibility, as far as I know (IE
>   6 does not support the [title] selector, but does not support the
>   <abbr> element either).

jQuery (which we include on all pages) includes a hack to make <abbr> and other elements stylable in IE6. Adding an attribute selector, however, will force it to drop the entire rule (including the styles for .explain) per the CSS spec (browsers should drop the entire rule if they don't understand any part of it).

So if we want to support IE6, we need to split this rule and provide different styles for saner browsers. I'm not sure if we want to do this, or if we should just kill this altogether (apart from the .explain part, I guess).
Comment 2 entlinkt 2013-09-28 12:28:53 UTC
(In reply to comment #1)
> [[mw:Developer access]]. Get it and submit patches directly! :)

I'll try to have a look.

> jQuery (which we include on all pages) includes a hack to make <abbr> and
> other elements stylable in IE6.

Is that true? It doesn't work for me. See also bug 24778.

> So if we want to support IE6, we need to split this rule and provide
> different styles for saner browsers. I'm not sure if we want to do this,
> or if we should just kill this altogether (apart from the .explain part,
> I guess).

"Kill this altogether" just for IE 6 or for all browsers?

I wouldn't kill it for all browsers because that would make it inconsistent: Mozilla and Opera <= 12 have a default styling similar to the one in shared.css, but IE and WebKit don't.

For the <abbr> part, I think restricting it to the presence of a title would be an improvement that might justify killing it for IE 6 (assuming that it worked at all, which it doesn't, for me) - there are valid reasons to use <abbr> without a title. The .explain part probably doesn't matter too much (one could argue that the class should simply not be used without a title).

Maybe something along the lines of this (assuming that it works at all in IE 6):

/* Always highlight these things in IE 6 */
* html abbr,
* html .explain {
    border-bottom: 1px dotted;
    cursor: help;
}

/* In other browsers, only highlight this if there is something to see */
abbr[title],
.explain[title] {
    border-bottom: 1px dotted;
    cursor: help;
}
Comment 3 entlinkt 2013-09-28 12:39:34 UTC
By the way, IE <= 6 renders 1px dotted borders as dashed, cf. http://blogs.msdn.com/b/ie/archive/2006/08/22/712830.aspx
Comment 4 Bartosz Dziewoński 2013-09-28 14:43:04 UTC
(In reply to comment #2)
> > jQuery (which we include on all pages) includes a hack to make <abbr> and
> > other elements stylable in IE6.
> 
> Is that true? It doesn't work for me. See also bug 24778.

…actually, I don't even know. I was under the impression that it's supposed to work, but I tested now and it clearly doesn't. I don't think anybody cares. ;)

Given that I think going with your original patch is a good idea :) Do you want to submit it yourself or should I do it?
Comment 5 entlinkt 2013-09-28 16:01:51 UTC
(In reply to comment #4)
> Do you want to submit it yourself or should I do it?

It would be nice if you could submit it this time ;) I'll try to understand how this works for the next time.
Comment 6 Gerrit Notification Bot 2013-09-28 17:14:42 UTC
Change 86382 had a related patch set uploaded by Bartosz Dziewoński:
Restrict <abbr> formatting to where a title attribute is present

https://gerrit.wikimedia.org/r/86382
Comment 7 Bartosz Dziewoński 2013-10-04 13:53:23 UTC
Patch merged. Thanks!
Comment 8 Gerrit Notification Bot 2013-10-04 13:58:11 UTC
Change 86382 merged by jenkins-bot:
Restrict <abbr> formatting to where a title attribute is present

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

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


Navigation
Links