On Tue, Mar 31, 2009 at 5:52 AM, Håkon Wium Lie <howc...@opera.com> wrote:
> In the quest to simplify and improve Wikipedia's HTML code, the turn
> has come to footnotes. Here is a proposal that describes how the
> number of elements needed to represent footnotes can be halved:
>
>  http://www.princexml.com/howcome/2009/wikipedia/ref/
>
> As far as I can tell, the proposed markup works in legacy browsers,
> too.

This looks good overall.  Some comments:

1) A problem we often tend to have with this kind of thing is that
users write lots of custom CSS and JS that depends on the exact
elements used, which breaks if we change the markup.  For instance, I
find the following rules in the English Wikipedia's custom stylesheet:

sup.reference:target {
    background-color: #DEF;
}
/* stop references with groups from line-breaking */
sup.reference a {white-space: nowrap;}

<http://en.wikipedia.org/wiki/MediaWiki:Common.css>

These would break if we got rid of the <sup>, on the English Wikipedia
and possibly on tons of other wikis as well.  This makes me reluctant
to do that.

2) I notice you used "font-size: 85%; vertical-align: 35%" instead of
the CSS2.1 recommended value for sup, "font-size: 83%; vertical-align:
sup".  Is there any particular reason for this?  Specifically, one
important objective for such a change would be that line-spacing
shouldn't be changed, and I'd have to test that in various browsers to
avoid regression there.

3) Some of the changes you recommend actually aren't software issues,
but customizations by the particular wiki's sysops.  In particular,
the extra <span>s around the square brackets are specific to enwiki:

http://en.wikipedia.org/w/index.php?title=MediaWiki:Cite_reference_link&action=history

So is the <b>:

http://en.wikipedia.org/w/index.php?title=MediaWiki:Cite_references_link_one&action=history

In the default software, they don't exist.  To get rid of them, you'd
want to make a suggestion on wikien-l, the enwiki Village Pump, or a
similar forum.  wikitech-l is mostly for the developers and sysadmins,
who can't really affect what particular communities choose to do in
this sort of thing.

4) The reason we have an <a> inside a <sup> turns out to be because in
wikimarkup, you can't give custom attributes to <a>.  The markup used
for the message is wikimarkup, which simply cannot achieve your
suggested HTML output.  We'd have to move this to raw HTML to allow
it, which would mean hardcoding it into the software, since we don't
like to give sysops access to output raw HTML (to reduce the chance of
invalid markup -- they can add arbitrary JS anyway, so XSS isn't
really an issue).  This would probably annoy people, since they've
already customized it.  Or we'd have to add support for explicit <a>
to wikimarkup -- maybe a good idea, but also a bigger project.



I do like your proposed markup, and think it would be great if we
could move to simpler and more semantic markup overall, but it's not
clear to me how to best go about implementing most of it.  I've at
least removed the empty title="" attribute, in r49075.  Of the rest,
some I can't do: it's up to enwiki sysops.  And one bit (giving
attributes to the <a> element) wouldn't work at all without some
potentially significant unrelated changes.  But it would be nice if we
could move more in this direction, definitely.

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to