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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webchick’s picture

Issue tags: +mobile, +html5

Tagging.

LewisNyman’s picture

It'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.

dcmouyard’s picture

I agree with lewisnyman.

BarisW’s picture

Status: Active » Needs review
FileSize
962 bytes

As 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.

BarisW’s picture

Added the Conditional Comment on the wrong tag.

barraponto’s picture

Status: Needs review » Reviewed & tested by the community

And it gets rid of a trailing space :D
We should really take html5-boilerplate as a reference.

webchick’s picture

Status: Reviewed & tested by the community » Needs review

Well 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.

barraponto’s picture

So, 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

barraponto’s picture

Status: Needs review » Reviewed & tested by the community

Found 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.

webchick’s picture

Status: Reviewed & tested by the community » Needs review

Hm. 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.

JohnAlbin’s picture

So 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.

barraponto’s picture

Status: Needs review » Closed (won't fix)

OK, if we're ever into validation, we should just open an issue for that. Closing.

BarisW’s picture

Status: Closed (won't fix) » Needs review

Thanks 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?

LewisNyman’s picture

The 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.

barraponto’s picture

oh IE, can't you just die?

webchick’s picture

+1 #15 ;)

BarisW’s picture

To 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?

JohnAlbin’s picture

I 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.

barraponto’s picture

Adding 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.

mcjim’s picture

Status: Needs review » Closed (won't fix)

I 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.

Damien Tournoud’s picture

Status: Closed (won't fix) » Needs work

Reopening. 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.

LewisNyman’s picture

Title: http-equiv="cleartype" is invalid HTML5 » Remove the http-equiv="cleartype" meta tag
Status: Needs work » Active

Yes, I don't think we need this tag when we don't actually support old windows phones.

JohnAlbin’s picture

Status: Active » Needs work

Ok. Works for me.

The next patch should remove the metatag.

BarisW’s picture

Status: Needs work » Needs review
FileSize
550 bytes

Great! There goes.

Status: Needs review » Needs work

The last submitted patch, cleartype-invalid-html-fix-1717090-24.patch, failed testing.

barraponto’s picture

Status: Needs work » Needs review
FileSize
1.26 KB

reroll, this time removing it from tests as well.

LewisNyman’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies and the tag is removed, code looks good.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Yay, less code, more validation! :)

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.