To solve validness I'd suggest creating styles for this in
MediaWiki:Common.css and on a regular basis running reports to surface
which articles use the text-align property. It would be great to have
a dedicated wiki page linking to these articles and asking editors to
fix them. It would give people who care about Wikipedia an easy way to
contribute.
I have a similar problem in mobile - at some point I'd like us to
deprecate use of the style attribute in wikitext in favour of using
stylesheets and the class attribute which is much more manageable and
would be interested in whatever solution you come to here.
On Thu, Sep 20, 2012 at 4:12 PM, Krinkle <krinklemail(a)gmail.com> wrote:
On Sep 19, 2012, at 6:23 PM, Derk-Jan Hartman
<d.j.hartman+wmf_ml(a)gmail.com> wrote:
I would like to open some discussion about
https://bugzilla.wikimedia.org/show_bug.cgi?id=40329
This bug is about the fact that we currently do a 'partial' transform of
the HTML5-invalid attribute 'align'.
We all agree that this is bad, what we need to figure out is what to do
next:
1: Disable the transform and output the align attribute even though it's
not valid HTML5. Solve validness later.
2: Remove the attribute from HTML5 and 'break' the content. Fix by users
(or bot).
3: Disable HTML5, correct the content of the wiki's (possibly with a bot)
and remove the attribute in HTML5 mode, reenable HTML5.
4: Fix the transform (not that easy)
My personal preference is with 1, since this is causing trouble now and
with 1 we solve immediate problems, we just add to the lack of valid HTML5
output that we already have. In my opinion 2 would be too disruptive and 3
would take too long.
Danny is of the opinion that we should never transform at the parser side
and that we should fix the content instead (2 or 3).
So, how best to fix the issue/what should be our strategy with regard to
content that is not HTML 5 valid in general ?
<Discuss>
I agree with others, #1 seems to be the best choice.
The W3C validator is not a visitor nor a user of the software. It's a useful tool to
find problems, but as long as browsers are not standards compliant, and the W3C validator
stays ignorant of that fact, we have very good reason to choose to optimize for real
browsers, and not the hypothetical browser in the eyes of the validator.
The HTML output of the MediaWiki software is meant for users. Users that have browsers in
front of them.
All relevant browsers support "align", regardless of whether the page is in
HTML5 made.
Having said that, word shall be spread to users to stop using "align" and make
layouts in CSS instead (through classes), which by design will make use of
"align" impossible and require usage of text-align and margin instead.
Even if we could transform it correctly, I would oppose automatic transformation (be it
from output-only in the parser, or by a bot changing the actual wikitext). Because the
"align" attribute is a means to an end that has lots of implications and
possible unintended side-effects. Contrary to text-align and margin, which are very
specific and targeted at their purpose. By replacing a single align attribute with all
kinds of inline styles the original intention of that align attribute will be lost at the
cost of a lot of bloat in the output that we don't really need anyway.
-- Krinkle
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l