WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: trying to get a page to validate to AAA

for

Number of posts in this thread: 7 (In chronological order)

From: Sandy
Date: Tue, Jul 13 2010 4:00PM
Subject: trying to get a page to validate to AAA
No previous message | Next message →

Hey all,

I am having a bit of trouble making sense of something. I have a page
which validates to AAA when I use the version of "total validator" that
I downloaded and installed locally, but it doesn't validate when I use
the same application online.

here is the page:
http://sandyfeldman.com/test.html

here is the validator:
http://www.totalvalidator.com/validator/Validator

The problem line seems to be
<meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=utf-8" />

is that a valid line of code?

If not, what's the right syntax? the validator directs me to
http://www.w3.org/TR/2009/NOTE-xhtml-media-types-20090116/
which I've read, and don't feel any further ahead!

thanks very much to anyone who can help clear this up.

Sandy

From: Simius Puer
Date: Wed, Jul 14 2010 2:09AM
Subject: Re: trying to get a page to validate to AAA
← Previous message | Next message →

Hi Sandy

99% positive that's an error (as in what you have is correct but the
validator is wrong). You are serving the right content content type and
charset for your code and it validates happily through the W3C own
validator. I don't think you are going to hit any problems there.

If you do hit issues then consider if the content application driven / using
XML etc. If not then you can most likely use:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

as defined in:

http://www.w3.org/TR/2009/NOTE-xhtml-media-types-20090116/#C_9

...but there are restrictions: "In general, this media type is
*NOT*suitable for XHTML except when the XHTML is conforms to the
guidelines in Appendix
A<http://www.w3.org/TR/2009/NOTE-xhtml-media-types-20090116/#compatGuidelines>;."
(e.g. you can't add elements and attributes from foreign namespaces, such as
XHTML+MathML).


Testing locally is okay, but also validate remotely as it is important to
check how the document is "served" up in the live environment - there is a
difference.

Regards

From: Sandy
Date: Wed, Jul 14 2010 8:12AM
Subject: Re: trying to get a page to validate to AAA
← Previous message | Next message →

Andrew, thank you for taking the time to look at this for me. And thanks
for mentioning that it's important to check the page how the document is
"served" up in the live environment - I've suspected this for a while,
and it's good to have it confirmed.

I've just been reading about Character Encoding
http://www.w3.org/TR/2009/NOTE-xhtml-media-types-20090116/#C_9

"When delivering the document from a server" that would be anything I
post, right? When would I not be delivering the document from a server?
I think just when I am checking it locally, but is that it?

Is there a "content-type for dummies" tutorial somewhere? I need a basic
introduction.

thanks,
Sandy


> 99% positive that's an error (as in what you have is correct but the
> validator is wrong). You are serving the right content content type and
> charset for your code and it validates happily through the W3C own
> validator. I don't think you are going to hit any problems there.
>
> If you do hit issues then consider if the content application driven /
> using XML etc. If not then you can most likely use:
>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
>
> as defined in:
>
> http://www.w3.org/TR/2009/NOTE-xhtml-media-types-20090116/#C_9
>
> ...but there are restrictions: "In general, this media type is *NOT*
> suitable for XHTML except when the XHTML is conforms to the guidelines
> in Appendix A
> <http://www.w3.org/TR/2009/NOTE-xhtml-media-types-20090116/#compatGuidelines>;."
> (e.g. you can't add elements and attributes from foreign namespaces,
> such as XHTML+MathML).
>
>
> Testing locally is okay, but also validate remotely as it is important
> to check how the document is "served" up in the live environment - there
> is a difference.
>
> Regards
>
>

From: Iza Bartosiewicz
Date: Wed, Jul 14 2010 10:33PM
Subject: Re: trying to get a page to validate to AAA
← Previous message | Next message →

Hi Sandy,

> Is there a "content-type for dummies" tutorial somewhere? I need a basic introduction.

Try these:

Character encodings in HTML and CSS http://www.w3.org/International/tutorials/tutorial-char-enc/
Bulletproof HTML: 37 Steps to Perfect Markup http://articles.sitepoint.com/article/html-37-steps-perfect-markup
The Definitive Guide to Web Character Encoding http://articles.sitepoint.com/article/guide-web-character-encoding

cheers
Iza



--

----
Izabella Bartosiewicz
Web Coordinator
RMIT University Library

03 9925 3103
= EMAIL ADDRESS REMOVED =
www.rmit.edu.au/library
www.linkedin.com/in/izabartosiewicz
twitter.com/mr0wka18 ( http://www.twitter.com/mr0wka18 )

Save a tree... Don't print this email unless you have to...

From: Sandy
Date: Thu, Jul 15 2010 7:27AM
Subject: Re: trying to get a page to validate to AAA
← Previous message | Next message →

hi Iza,

These are really good! thank you. They cover character encodings really
well.

The thing I am confused about, and could use a "dummies" tutorial for is
content="application/xhtml+xml;
I think this is different than charset=utf-8 - right?

this is the code in my page
http://sandyfeldman.com/test.html

<meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=utf-8" />

and the web version of total validator
http://www.totalvalidator.com/validator/Validator
is giving me the warning

HTML Warnings

W608 - 1 instance(s): XHTML should be served with a content type of
'application/xhtml+xml'.

Two reasons I am finding this warning so confusing:

1. it's not showing up when I use total validator locally or when I use
the w3 validator.
Andrew says, "99% positive that's an error (as in what you have is
correct but the validator is wrong)." Do you agree I can ignore the
result on the web based validator?

2. I don't really *understand* the content="application/xhtml+xml. I
think it's what I need for the document type XHTML 1.1 - but I don't
understand what's going on there. That's what I could use a simple
explanation for.

Thanks again for taking the time to come up with those links, and for
helping me get clear on this.

Sandy


>> Is there a "content-type for dummies" tutorial somewhere? I need a
>> basic introduction.
>
> Try these:
>
> Character encodings in HTML and CSS
> http://www.w3.org/International/tutorials/tutorial-char-enc/
> Bulletproof HTML: 37 Steps to Perfect Markup
> http://articles.sitepoint.com/article/html-37-steps-perfect-markup
> The Definitive Guide to Web Character Encoding
> http://articles.sitepoint.com/article/guide-web-character-encoding
>
> cheers Iza
>
>
>

From: Peter Krantz
Date: Thu, Jul 15 2010 8:03AM
Subject: Re: trying to get a page to validate to AAA
← Previous message | Next message →

On Thursday, July 15, 2010, Sandy wrote:

> is giving me the warning
>
> W608 - 1 instance(s): XHTML should be served with a content type of
> 'application/xhtml+xml'.

You are using XHTML 1.1 which must be served by the server as
'application/xhtml+xml'.

Your page is served as text/html when I request it via
http://web-sniffer.net/ thus, an error. This has no impact on
accessibility though.

The server sends out information about the content type in the http
headers before the start of the document. This does not happen when
you test a document locally loaded from a disk.

There are no advantages of using the XHTML 1.1 doctype. Only
disadvantages. Can you switch to HTML 4.01 or HTML 5 instead?

Regards,

Peter Krantz
Http://www.standards-schmandards.com

From: Sandy
Date: Thu, Jul 15 2010 9:15AM
Subject: Re: trying to get a page to validate to AAA
← Previous message | No next message

Peter - thanks!

I changed the doctype to XHTML 1.0 Strict and the thing validates
everywhere now.

http://sandyfeldman.com/test1.html

so the problem is solved, but (for me) the mystery remains.
Why is the first test served as text/html? What did I get wrong in the
header?
http://sandyfeldman.com/test.html

thanks again for your time!
Sandy

>> is giving me the warning
>>
>> W608 - 1 instance(s): XHTML should be served with a content type of
>> 'application/xhtml+xml'.
>
> You are using XHTML 1.1 which must be served by the server as
> 'application/xhtml+xml'.
>
> Your page is served as text/html when I request it via
> http://web-sniffer.net/ thus, an error. This has no impact on
> accessibility though.
>
> The server sends out information about the content type in the http
> headers before the start of the document. This does not happen when
> you test a document locally loaded from a disk.
>
> There are no advantages of using the XHTML 1.1 doctype. Only
> disadvantages. Can you switch to HTML 4.01 or HTML 5 instead?
>
> Regards,
>
> Peter Krantz
> Http://www.standards-schmandards.com
>
>