RE: Markup / CSS / XHTML

Hi Judy,
Whoever wrote those statements is seriously over-stretching their case. Most of what they have written is either out of date or plain wrong. My views are:

  1.  WCAG 1.0 used to require that the HTML and CSS validated without errors, but this requirement was dropped in WCAG 2.0, which only 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".

This means you don't need to validate the CSS at all. You do need to validate the HTML, but you need to filter the results to only display the relevant ones. You can get a bookmarklet that does this from https://dotjay.github.io/wcag-parsing-filter/bookmarklet/. When you do this on your website, there is only one relevant error, which is a stray closing tag. I have looked at the code, and in this case browsers will ignore it, so it actually has zero impact in practice.

I would never argue against fixing the code so it validates, but almost none of your errors constitute a WCAG non-conformance. If the errors have any impact at all, they are likely to cause browser compatibility issues rather than accessibility ones.
  2.  The presence of xmlns="https://www.w3.org/1999/xhtml/" in the <html> element does not mean the website is claiming to use the XHTML doctype. The website is using HTML5 as you would expect. I am no expert on namespaces, but the page at https://www.w3.org/1999/xhtml/ says that "The namespace name http://www.w3.org/1999/xhtml is intended for use in various specifications such as...HTML5".
  3.  The statement is completely untrue. The HTML specification has always stated that pages do not have to validate and that browsers can do what they like if they encounter invalid code. They may choose to ignore that particular piece of code, but they often attempt to fix it by taking a guess at what the author intended.

I would challenge whoever wrote that statement to provide any example (even one they have fabricated) where a browser ignores valid CSS.
  4.  In WCAG 1.0 it was a requirement that pages were usable without CSS, but this requirement was dropped in WCAG 2.0. in order to claim conformance with WCAG 2.0 or 2.1, the website must only rely on "accessibility supported" technologies. CSS is an accessibility supported technology, so conformant websites are allowed to rely on it. See https://www.w3.org/TR/UNDERSTANDING-WCAG20/conformance.html#uc-accessibility-support-head
  5.  From a WCAG conformance perspective, it is irrelevant whether browsers and screen readers exist that do not work with the Durham.ca website. From a validation perspective, the only requirement is that the website uses accessibility supported technologies (which include HTML and CSS) and that certain types of HTML validation errors do not occur. If users choose to use browsers and screen readers that do not work with a WCAG conformant website, that is not the website owner's problem.

Also, I cannot find anything in AODA that requires anything other than conformance with WCAG 2.1 level AA. The statement that "these problems are causing Durham.ca to be non-compliant with AODA" is not true in my opinion (or it will not be true when the one spurious closing tag is removed, which in any case is not having any effect on anything).
  6.  http-equiv="Content-Style-Type" and http-equiv="Content-Script-Type" do not exist in HTML5, so they can indeed be removed. However, that won't actually fix anything because browsers will already be ignoring them.

Steve Green
Managing Director
Test Partners Ltd

From: Judy Christianson <Judy.Christianson@durham.ca>
Sent: 03 March 2020 16:12
To: w3c-wai-ig@w3.org
Subject: Markup / CSS / XHTML

Hi,
I am not a web developer, but I am working with the accessibility of document. Someone has commented on the accessibility of our website and wondered if I could get input and feedback from you regarding the comments received. What I am looking for is the validity of the six statements below and what you would suggest for fixes if you are able to. The website was developed by a third party service provider.
Comments received are listed below:

  1.  WCAG 2.0 indicates that websites must have correctly formed markup and CSS, but testing today (2020-02-18) with W3C's markup and CSS validators, I see a total of 447 errors and warnings:

Markup: https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.durham.ca%2Fen%2Findex.aspx
CSS: https://jigsaw.w3.org/css-validator/validator?uri=https%3A%2F%2Fwww.durham.ca%2Fen%2Findex.aspx
  2.  At the top of Durham.ca's markup, Durham.ca's webmaster has declared "http://www.w3.org/1999/xhtml" as the website's XML namespace, which means that Durham.ca is claiming compliance with W3C's XHTML standard, even though it isn't.  W3C created the XHTML standard in 1999, and finalized it in early 2000, over seventeen years before Durham.ca was revamped in late 2017.  XHTML also predates the existence of Durham.ca, which wasn't created until 2007 as the replacement for Durham.on.ca.
  3.  CSS errors can cause significant usability problems in web browsers and in screen readers that can parse CSS.  If such software/hardware is unable to parse a website's CSS due to errors in the website's CSS, then it will typically respond by not using any of the website's CSS to render its pages.
  4.  Mozilla Firefox is a web browser with a feature that allows a user to temporarily display a website without the website's CSS.  If you use Mozilla Firefox to access Durham.ca, and then go to "View" menu -> "Page Style" -> "No Style", you'll discover that Durham.ca would be extremely difficult to use without CSS.  You can enable CSS again by going to "View" menu -> "Page Style" -> "Basic Page Style".
  5.  While the web browsers and screen readers that Durham.ca's webmaster used to test Durham.ca may have been designed to work around Durham.ca's markup and CSS problems, I'm not aware of any standards that require all web browsers and screen readers to do this, and there's no guarantee that the most popular web browsers and screen readers will continue to tolerate these problems indefinitely....  More importantly, these problems are causing Durham.ca to be non-compliant with AODA.
  6.  Fortunately, all these problems can be corrected fairly easily.  For example, Durham.ca's "meta" markup elements with attributes http-equiv="Content-Style-Type" and http-equiv="Content-Script-Type" are obsolete vestiges from HTML 4 that don't exist in XHTML, so Durham.ca's webmaster could eliminate two markup errors by simply removing these two elements.
Judy Christianson
THIS MESSAGE IS FOR THE USE OF THE INTENDED RECIPIENT(S) ONLY AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, PROPRIETARY, CONFIDENTIAL, AND/OR EXEMPT FROM DISCLOSURE UNDER ANY RELEVANT PRIVACY LEGISLATION. No rights to any privilege have been waived. If you are not the intended recipient, you are hereby notified that any review, re-transmission, dissemination, distribution, copying, conversion to hard copy, taking of action in reliance on or other use of this communication is strictly prohibited. If you are not the intended recipient and have received this message in error, please notify me by return e-mail and delete or destroy all copies of this message.

Received on Monday, 8 June 2020 18:01:54 UTC