Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
According to http://validator.w3.org/check:
<meta http-equiv="cleartype" content="on" />
yields "Bad value cleartype for attribute http-equiv on element meta."
This was added in #1468582: Add mobile friendly meta tags to the html.tpl.php for better compatibility with Windows, I guess. It creates a bad first impression tho for a CMS aiming to tout native HTML5 support. :\ Unless there's a better validator out there than this one?
Comment | File | Size | Author |
---|---|---|---|
#26 | drupal-remove_the_http_equivcleartype-1717090-26.patch | 1.26 KB | barraponto |
#24 | cleartype-invalid-html-fix-1717090-24.patch | 550 bytes | BarisW |
#5 | cleartype-invalid-html-fix-1717090-5.patch | 960 bytes | BarisW |
#4 | cleartype-invalid-html-fix-1717090-4.patch | 962 bytes | BarisW |
Comments
Comment #1
webchickTagging.
Comment #2
LewisNyman CreditAttribution: LewisNyman commentedIt's a non-standard tag for a non-standard browser. I liken it to a prefixed CSS property. It's not technically in the spec but it's common sense to include it.
Comment #3
dcmouyard CreditAttribution: dcmouyard commentedI agree with lewisnyman.
Comment #4
BarisW CreditAttribution: BarisW commentedAs it's an IE Mobile specific vendor fix, we could add conditional comments around it, just like done here: https://github.com/h5bp/mobile-boilerplate/commit/feb59c52ae77bb80a2a76d...
Patch attached.
Comment #5
BarisW CreditAttribution: BarisW commentedAdded the Conditional Comment on the wrong tag.
Comment #6
barraponto CreditAttribution: barraponto commentedAnd it gets rid of a trailing space :D
We should really take html5-boilerplate as a reference.
Comment #7
webchickWell if this is copasetic, this would be a great fix!
However, the pointer to html5-boilerplate shows that they're not using this cleartype property at all, within conditional comments or no. https://github.com/h5bp/html5-boilerplate/blob/master/index.html
Marking back down to needs review so we can discuss this a little bit more.
Comment #8
barraponto CreditAttribution: barraponto commentedSo, upon closer inspection, HTML5 Mobile Boilerplate does not surround http-equiv in conditional comments, and I can't find the mentioned commit in a fresh checkout of the project (weird). But I guess the approach is better than just leaving it there and even better than actually removing it.
@webchick: you were looking at HTML5 regular boilerplate. I wasn't aware there was a mobile boilerplate, but there is https://github.com/h5bp/mobile-boilerplate/blob/master/index.html#L11
Comment #9
barraponto CreditAttribution: barraponto commentedFound it: https://github.com/h5bp/mobile-boilerplate/pull/109
TL;DR that's all that stops H5BP from validating, but it's not something they care about. I think we're not discussing whether we should care, at least not in this issue. So I do believe this is copasetic.
Comment #10
webchickHm. That discussion (sorta) seems to imply we should "won't fix" rather than commit this patch.
Moving back down to needs review for discussion. I'd love to hear from lewisnyman, JohnAlbin, etc. .. some of the people involved in #1468582: Add mobile friendly meta tags to the html.tpl.php.
Comment #11
JohnAlbinSo I don't think we've had a "should we do validation for validation's sake?" discussion in the Drupal community. I think it's a very useful tool, but I don't believe we need to jump through hoops when the validator is over-aggressive. A "broken tag" like this does not cause any breakage in any browser, so I'm fine with leaving the tag as-is and not validating.
Comment #12
barraponto CreditAttribution: barraponto commentedOK, if we're ever into validation, we should just open an issue for that. Closing.
Comment #13
BarisW CreditAttribution: BarisW commentedThanks John. But on the other hand; is there a reason NOT to include this conditional comment? I don't know if this is the same for other countries, but in the Netherlands governmental websites must pass W3 validation. As it's a TPL file it's easy to fix, but wouldn't it be great if Drupal passes out-of-the-box?
Comment #14
LewisNyman CreditAttribution: LewisNyman commentedThe latest version of Internet Explorer (10) is dropping support for conditional comments. We should check to see if the cleartype switch is even supported in modern IE. I can't find any evidence to confirm it is supported in anything other than Windows Mobile 6.5 but let's confirm this.
Comment #15
barraponto CreditAttribution: barraponto commentedoh IE, can't you just die?
Comment #16
webchick+1 #15 ;)
Comment #17
BarisW CreditAttribution: BarisW commentedTo summarize:
- The cleartype tag is added to improve display on Windows browsers (Windows Mobile). Other browsers ignore this tag.
- This tag makes Drupal not validate anymore, which is a bad thing.
- We can simply overcome this by adding a conditional comment. This one is still ignored by other browsers, and Windows Mobile will still use it. No drawbacks, and validation passes again.
The reason that it hasn't made it to the Mobile Boilerplate repository is the lack of response of the original issue poster. This doesn't say there isn't a good reason to implement it :)
Or, else, can we just remove the tag instead of leaving it as is?
Comment #18
JohnAlbinI have the opposite opinion. Validation for validation's sake, as Paul Irish says, is silly. We _know_ that this tag is ignored by browsers that don't understand it. And we know that it is validly written for IE. Adding extra code weight (e.g. it's is a tiny front-end performance hit) of a conditional comment is superfluous. And we can find no project that is wrapping this tag in a conditional comment.
Comment #19
barraponto CreditAttribution: barraponto commentedAdding 8 characters is the tiniest front-end performance I can imagine (short of adding 7- characters). We'd be removing a node from the DOM tree, so I bet we're even.
Now, IE10 dropping the conditional comments means it would be ignoring the cleartype, introducing a bug. I guess we better leave it like that and anyone requiring W3C-validation can remove it from their theme specific html preprocess. At least it's dead easy.
Comment #20
mcjim CreditAttribution: mcjim commentedI think #18 and #19 sum up nicely why we should close this.
We should open a "validation for validation's sake" issue if we feel it needs to be discussed further as that would determine whether this issue should be reopened.
Comment #21
Damien Tournoud CreditAttribution: Damien Tournoud commentedReopening. Windows phone has a nearly insignificant market share, and no public documentation that I could find explains which browser supports the cleartype meta tag. Cleartype seems to have been disabled by default in the past, but it is very obvious that it is going to be enabled by default in the future (it is enabled by default on iPhone and Android since basically forever).
Let's drop this tag, please.
Comment #22
LewisNyman CreditAttribution: LewisNyman commentedYes, I don't think we need this tag when we don't actually support old windows phones.
Comment #23
JohnAlbinOk. Works for me.
The next patch should remove the metatag.
Comment #24
BarisW CreditAttribution: BarisW commentedGreat! There goes.
Comment #26
barraponto CreditAttribution: barraponto commentedreroll, this time removing it from tests as well.
Comment #27
LewisNyman CreditAttribution: LewisNyman commentedPatch applies and the tag is removed, code looks good.
Comment #28
webchickYay, less code, more validation! :)
Committed and pushed to 8.x. Thanks!