WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Why specify a DOCTYPE? Why validate?

for

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

From: Mark Pilgrim
Date: Thu, May 30 2002 6:31AM
Subject: Why specify a DOCTYPE? Why validate?
No previous message | Next message →

First off, let me disclaim the question by saying that I maintain a site of several hundred pages which all validate as XHTML 1.1 and are all Section 508 compliant. (They would be Bobby AAA compliant too, if Bobby were a little less buggy, but that's a different topic.) I write about accessibility from time to time, and I practice what I preach.

However...

I have never figured out why specifying a DOCTYPE or having markup that could pass validator.w3.org is important to accessibility.

WAI 1.0 says only this:
"Validating to a published formal grammar and declaring that validation at the beginning of a document lets the user know that the structure of the document is sound. It also lets the user agent know where to look for semantics if it needs to."

WAI 2.0 (working draft, April 24, 2002) says this:
"Checkpoint 5.1 [4.2] Use technologies according to specification.

You will have successfully met Checkpoint 5.1 at the Minimum Level if:

except where the site has documented that a specification was violated for backward compatibility, the markup has passed validity tests of the language (whether it be conforming to a schema, DTD, or other tests described in the specification)."

...All of which boils down to "your documents should validate because we say so," which is unsatisfying.

I understand that specifying a DOCTYPE is important because you can't validate without one, and validation is important because validation is important, but why is validation important for accessibility? Are there user agents that validate a document at rendering time, or that require valid documents? Screen readers read broken documents just fine; Lynx displays broken documents just fine; invalidity doesn't interfere with text zoom or screen magnifiers or any other assistive technology I can think of.

Furthermore, a nested table-based layout and no header tags could be a perfectly valid document and still be an inaccessible mess, contradicting WAI 1.0's claim that validity implies any measure of structural soundness.

So why specify a DOCTYPE? Why validate?

Please CC, I'm on digest.

-Mark Pilgrim
http://diveintomark.org/


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/


From: Jon Gunderson
Date: Thu, May 30 2002 6:45AM
Subject: Re: Why specify a DOCTYPE? Why validate?
← Previous message | Next message →

Mark,

One of the most important reasons to validate is that it makes sure that
people with disabilities can use a wider range of web technologies to
access web information. People with disabilities tend to use less main
stream technologies to access web documents and use more specialized
technologies that don't repair HTML like popular browsers like Netscape
Navigator and Microsoft Internet Explorer. I have heard that about two
thirds of the code in these browsers is used to repair invalid HTML
(software bloat). So just because a web page works one of these browsers
doesn't mean it will work on less popular browsers. The best way to do
that is to validate documents to the HTML standards. This not only helps
people with disabilities, but helps all users by giving them more options
to access web content.

The web works best when people use the standards to maximize interoperability.

Jon


At 09:18 AM 5/30/2002 -0400, you wrote:
>First off, let me disclaim the question by saying that I maintain a site
>of several hundred pages which all validate as XHTML 1.1 and are all
>Section 508 compliant. (They would be Bobby AAA compliant too, if Bobby
>were a little less buggy, but that's a different topic.) I write about
>accessibility from time to time, and I practice what I preach.
>
>However...
>
>I have never figured out why specifying a DOCTYPE or having markup that
>could pass validator.w3.org is important to accessibility.
>
>WAI 1.0 says only this:
> "Validating to a published formal grammar and declaring that validation
> at the beginning of a document lets the user know that the structure of
> the document is sound. It also lets the user agent know where to look for
> semantics if it needs to."
>
>WAI 2.0 (working draft, April 24, 2002) says this:
> "Checkpoint 5.1 [4.2] Use technologies according to specification.
>
> You will have successfully met Checkpoint 5.1 at the Minimum Level if:
>
> except where the site has documented that a specification was violated
> for backward compatibility, the markup has passed validity tests of the
> language (whether it be conforming to a schema, DTD, or other tests
> described in the specification)."
>
>...All of which boils down to "your documents should validate because we
>say so," which is unsatisfying.
>
>I understand that specifying a DOCTYPE is important because you can't
>validate without one, and validation is important because validation is
>important, but why is validation important for accessibility? Are there
>user agents that validate a document at rendering time, or that require
>valid documents? Screen readers read broken documents just fine; Lynx
>displays broken documents just fine; invalidity doesn't interfere with
>text zoom or screen magnifiers or any other assistive technology I can
>think of.
>
>Furthermore, a nested table-based layout and no header tags could be a
>perfectly valid document and still be an inaccessible mess, contradicting
>WAI 1.0's claim that validity implies any measure of structural soundness.
>
>So why specify a DOCTYPE? Why validate?
>
>Please CC, I'm on digest.
>
>-Mark Pilgrim
>http://diveintomark.org/
>
>
>----
>To subscribe, unsubscribe, or view list archives,
>visit http://www.webaim.org/discussion/

Jon Gunderson, Ph.D., ATP
Coordinator of Assistive Communication and Information Technology
Division of Rehabilitation - Education Services
MC-574
College of Applied Life Studies
University of Illinois at Urbana/Champaign
1207 S. Oak Street, Champaign, IL 61820

Voice: (217) 244-5870
Fax: (217) 333-0248

E-mail: = EMAIL ADDRESS REMOVED =

WWW: http://www.staff.uiuc.edu/~jongund
WWW: http://www.w3.org/wai/ua



----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/

From: Holly Marie
Date: Thu, May 30 2002 6:46AM
Subject: Re: Why specify a DOCTYPE? Why validate?
← Previous message | Next message →

From: "Mark Pilgrim"
<| So why specify a DOCTYPE? Why validate?
|
| Please CC, I'm on digest.

Are you aware of the different displays in newer browsers that are
linked to correct dtd use?
If no DTD and/or improper DTD is used? then the page is displayed with
some sort of backwards application or quirks mode.
And your xhtml 1.0 strict page may not actually be displaying in ways
you would like? It has been a while since I read about the various quirk
modes. Some are linked to using transitional html4.0 in newer browsers
or no document DTD at all?

I am not sure how this works between IE and NN, and others, but it does
exist.
Recently there was a thread regarding this topic on DTD and Doctype
use... on another web design list. And I did a search on the messages to
pull up some of these links.


links to documents explaining about the various modes or displays:
<http://www.saila.com/usage/tips/#doctype>;

<http://msdn.microsoft.com/workshop/author/css/overview/CSSEnhancements.
asp>
<http://www.mozilla.org/docs/web-developer/quirks/>;

Of course it is generally a good idea to use a correct doctype with a
complete link to the file where this document is residing. Newer
machines and browsers or devices accessing information will be more able
to deliver and render a page if the rules for the document are linked to
the document. I do know as xhtml /xml become more used and in various
deliveries, these doctypes or DTDs and specialized ones will become even
more important.

holly



----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/


From: Holly Marie
Date: Thu, May 30 2002 7:08AM
Subject: Re: Why specify a DOCTYPE? Why validate?
← Previous message | Next message →

|
| So why specify a DOCTYPE?

http://c2.com/cgi-bin/wiki?copy=ValidHtml
This is an interesting set of information, too.
I was looking for the NN pages on Quirks modes and display problems
associated with using various doctypes or no doctype or DTD at all, and
cam up with this link....

An interesting portion of this post...
"For instance, using a 4.0 Transitional DocType while using 'name'
within the image tag will cause some versions of IE to occasionally fail
to load images."

If I find the NN quirks mode link I will post it. It could follow Moz
closely or a link for that information may even be located in this
article above.

| Why validate?

I did not see this little last question. I validate as I write, and also
check the pages at Delorie.com with various web tools(backwards viewer,
css off etc, and Lynx viewer, as well as purifier). I also test the
pages at a few more checks and validators, including bobby [ WAI and the
other check] and Vischeck.com for color viewer differences.
http://www.htmlhelp.com , info on differences and tools at:
http://www.arealvalidator.com/real-validation.html too.

I have been writing by hand and more of xhtml for a few years, so it is
not often there are mistakes, but they do happen. It is easy to leave
off a closing tag or make a mistake and include an old attribute that is
no longer included in a version of xhtml, etc... It is also easy to
catch an image that may have been put in and the alt was missed by
accident.

Testing or checking a page in a lynx viewer is helpful when checking the
text content and flow of the page. There are other ways.
Validating and checking is a very good idea, we can have a better idea
that the page will work. It is true that some things will validate and
may not be good to use on a page, however, I am one that believes that
the validator is not the only tool that should be used to check pages.
Only one. And there are a few types of validators too. Lints and SGML
parse types...

holly



----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/


From: John Foliot - bytown internet
Date: Thu, May 30 2002 7:25AM
Subject: RE: Why specify a DOCTYPE? Why validate?
← Previous message | Next message →

I'm asked this often, and the best layman's explanation I can give is that
the DTD defines the dictionary/thesaurus of the page elements so that the
user agent can "understand" what is being said. I use this analogy:

"If I told you I left my lunch in my boot, you'd think I was very strange.
But if I was standing in London, England you would probably know that my
lunch was in the trunk of my car."

Semantics is everything, but if the common reference point(s) is/are not
specified "up front" then the *possibility* of confusion exists. In
January, Wired Magazine ran a great article about the importance of
Standards (http://www.wired.com/wired/archive/10.01/standards.html). It's a
good read - highly recommended.

The DTD declares the Standard that the document is authored to. User agents
can be programmed to interpret custom tags if they have been properly
documented in a Custom DTD (IE/Microsoft is already starting to support
this). Good user agents are also programmed to properly implement the
existing tags... but the programs need to expect that the tags being used
are being used properly. To me, this make clear sense. (BTW - This is also
the premise of XML; define your tags, tell the user agent what they do, then
use your tags)

Take the LONGDESC attribute associated with the <.img> element. Right now
(to my knowledge), only IBM Homepage Reader properly supports this
attribute. This is a good thing on IBM's part, and I wish other user agents
would support this attribute properly as well. But when the IBM developers
where programming the browser, they referred to the spec or standard to know
how the attribute should be properly used, so that their agent could
properly render the final output. To be used properly, longdesc should
equal the URL of the text description of the image. But I've seen it used as
<..longdesc="blah,blah,blah about the image">, which is clearly wrong.
Should IBM add lines and lines of code to compensate for incorrectly
developed web pages, or not include the support of LONGDESC at all because
doing so is just too difficult, or should the user agent just not deliver
the "junk" being imputed into it? If the page author had used the attribute
correctly (and verified that it was being used correctly by validating the
document), then the problem would not exist, the attribute would be rendered
correctly. To me, again, this make clear sense.

As user agents become thinner and thinner clients, the capability of it's
processing power to compensate with bad code diminishes. I don't know a
whole bunch about the current state of wireless here in Canada (note to
self - more research), but I do know that a friend of mine who has a RIM
Blackberry can access web pages wirelessly. It grabs the HTML docs and
converts them to WML on the fly (very cool!). Pages which validate to HTML
4.01 are pretty good, XHTML are VERY good, but crummy code... yech. Thing
is, all those pages probably "look" the same in IE5.5 or IE6, but once you
start to repurpose the content it introduces a whole new set of previously
un-thought of variables. Yet the Valid XHTML comes through with flying
colours. Why? Because it has been properly formatted and developed. How
do we know this? Because the author bothered to verify that the page was
"well formed" or valid against the standard it was written to. And to know
which standard is being used, we need to declare it. Thus, the Document
Type Declaration (DTD).

JF



> -----Original Message-----
> From: Mark Pilgrim [mailto: = EMAIL ADDRESS REMOVED = ]
> Sent: May 30, 2002 9:19 AM
> To: = EMAIL ADDRESS REMOVED =
> Cc: = EMAIL ADDRESS REMOVED =
> Subject: Why specify a DOCTYPE? Why validate?
>
>
> First off, let me disclaim the question by saying that I maintain
> a site of several hundred pages which all validate as XHTML 1.1
> and are all Section 508 compliant. (They would be Bobby AAA
> compliant too, if Bobby were a little less buggy, but that's a
> different topic.) I write about accessibility from time to time,
> and I practice what I preach.
>
> However...
>
> I have never figured out why specifying a DOCTYPE or having
> markup that could pass validator.w3.org is important to accessibility.
>
> WAI 1.0 says only this:
> "Validating to a published formal grammar and declaring that
> validation at the beginning of a document lets the user know that
> the structure of the document is sound. It also lets the user
> agent know where to look for semantics if it needs to."
>
> WAI 2.0 (working draft, April 24, 2002) says this:
> "Checkpoint 5.1 [4.2] Use technologies according to specification.
>
> You will have successfully met Checkpoint 5.1 at the Minimum Level if:
>
> except where the site has documented that a specification was
> violated for backward compatibility, the markup has passed
> validity tests of the language (whether it be conforming to a
> schema, DTD, or other tests described in the specification)."
>
> ...All of which boils down to "your documents should validate
> because we say so," which is unsatisfying.
>
> I understand that specifying a DOCTYPE is important because you
> can't validate without one, and validation is important because
> validation is important, but why is validation important for
> accessibility? Are there user agents that validate a document at
> rendering time, or that require valid documents? Screen readers
> read broken documents just fine; Lynx displays broken documents
> just fine; invalidity doesn't interfere with text zoom or screen
> magnifiers or any other assistive technology I can think of.
>
> Furthermore, a nested table-based layout and no header tags could
> be a perfectly valid document and still be an inaccessible mess,
> contradicting WAI 1.0's claim that validity implies any measure
> of structural soundness.
>
> So why specify a DOCTYPE? Why validate?
>
> Please CC, I'm on digest.
>
> -Mark Pilgrim
> http://diveintomark.org/
>
>
> ----
> To subscribe, unsubscribe, or view list archives,
> visit http://www.webaim.org/discussion/
>


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/

From: Jon Gunderson
Date: Thu, May 30 2002 7:56AM
Subject: RE: Why specify a DOCTYPE? Why validate?
← Previous message | No next message

Netscape 6.2 now supports access to the LONGDESC attribute through a
context sensitive menu on the image (right mouse button click when the
mouse pointer is hovering over the image).

Jon


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/