4

I am trying to make a website WCAG compliant and read quite a lot about it but still one question remains:

If the document has HTML errors, would it be considered WCAG 2.0 AA compliant?

Following is the report generated by Total Validator. It has 2 diff sections. 1 for HTML errors and other for WCAG errors. Does it mean that if there are HTML errors and WCAG errors, the document would be WCAG compliant?

Screenshot of the report generated by Total Validator, showing a section titled "HTML Errors" and a section titled "WCAG 2.0 A Errors".

It is HTML 4, by the way.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Hell Boy
  • 899
  • 5
  • 12
  • 22
  • 2
    How is that even a question? HTML errors are fixed, before I consider anything a finished product – nothing to discuss there, IMHO. (Unless there is a _real_ good argument to justify them – workarounds for older browsers that can not be accomplished any other way, etc.) – CBroe Oct 30 '13 at 07:27
  • 1
    @CBroe, it *is* a question, a simple one, presented clearly in the title. The answer might not be simple, and the question might not be what you think that should be asked, but it is a meaningful question. – Jukka K. Korpela Oct 30 '13 at 07:53
  • 1
    Well, then I’d say one should start by _reading_ the actual WCAG 2.0 AA spec. http://www.w3.org/TR/WCAG20/#ensure-compat, http://www.w3.org/WAI/WCAG20/quickref/#qr-ensure-compat-parses – CBroe Oct 30 '13 at 07:56

1 Answers1

7

HTML errors as such do not count as a violation of WCAG 2.0, though for various constructs, WCAG 2.0 may impose requirements that coincide with requirements in HTML specifications.

If WCAG 2.0 required conformance to HTML specifications, it would have to cite normatively some specific version(s) of some specific HTML specification(s) (thereby causing harmful rigidity) or use loose language, making WCAG 2.0 itself a very moving target (its content would vary, as HTML specifications are changed).

However, Guideline 4.1 (Compatible: Maximize compatibility with current and future user agents, including assistive technologies) requires that “elements have complete start and end tags, elements are nested according to their specifications, elements do not contain duplicate attributes, and any IDs are unique, except where the specifications allow these features”.

In this sense, some syntactic rules need to be obeyed in order to conform to WCAG 2.0. The scope of this requirement is rather vague, since HTML rules vary by language version, and the wording is somewhat strange an arbitrary-looking. For example, it does not forbid undefined elements, undefined attributes, attribute values that violate (some) HTML specifications, or anything that might be classified as “semantically wrong”. It is far from evident whether e.g. <a href=...><h2>...</h2></a> would violate WCAG 2.0: it is invalid nesting according to HTML 4 but allowed in HTML5 CR.

This differs from WCAG 1.0, which had a a general requirement about using W3C technologies and specifically avoiding deprecated HTML features. It is fair to assume that the change is intentional: WCAG 2.0 conformance criteria intentionally do not include conformance to some HTML specification(s)

Jukka K. Korpela
  • 195,524
  • 37
  • 270
  • 390
  • Thanks heaps. Great explanation. Then I think to actually make a website accessible to all users then, we should look into what sort of guidelines do assistive technologies follow. For instance, screen readers... would they read out the text/links/images correctly if a website was WCAG compliant but had HTML error... if they wouldn't then it will be worth correcting html erros? – Hell Boy Oct 30 '13 at 23:55
  • 1
    @HellBoy, that’s a different, and rather broad question. “HTML errors” cover a wide range of issues, from mere formalities (some specification just has an oddity that hasn’t been fixed) to fatal problems (malformed markup makes some user agent go very wild). As a rule of thumb, new pages should be valid HTML (unless you make an informed decision for good reasons), whereas fixing old pages does not pay off unless there are real problems in using them. – Jukka K. Korpela Oct 31 '13 at 06:20