Re: SC 4.1.1 source fails but DOM passes - must a page fail?

Hi Alan

I filed an issue on duplicate attributes which covers one aspect of this.
https://github.com/w3c/wcag/issues/542


The W3 HTML 5 spec has well-defined behaviour for duplicate attributes – browsers should always use the first attribute and ignore the others.
https://www.w3.org/TR/html5/syntax.html#attribute-name-state


The W3 HTML 5 spec also says behaviour for parsing errors is well-defined, and it’s defined throughout the spec, but it’s still an open question on how good browser interop is (though it’s probably at least as good as ARIA interop).

https://www.w3.org/TR/html5/single-page.html#parsing-html-documents


The spec does say browsers are free to ignore the rest of the document whenever they encounter a parse error, but that affects all users of the browser equally (on screen part of the document will be missing, in a screen reader the equivalent part of the document will also be missing).

Best Regards
Mark

--
Mark Rogers - mark.rogers@powermapper.com<mailto:mark.rogers@powermapper.com>
PowerMapper Software Ltd - www.powermapper.com
Registered in Scotland No 362274 Quartermile 2 Edinburgh EH3 9GL



From: "Bristow, Alan" <Alan.Bristow@elections.ca>
Date: Thursday, 10 January 2019 at 20:40
To: W3C ig <w3c-wai-ig@w3.org>
Subject: SC 4.1.1 source fails but DOM passes - must a page fail?
Resent-From: W3C ig <w3c-wai-ig@w3.org>
Resent-Date: Thursday, 10 January 2019 at 20:36

All,

Tasked with declaring a page as passing or failing SC 4.1.1
https://www.w3.org/TR/WCAG20/#ensure-compat-parses

I am looking for an authoritative source to back up one or other of these two positions:

1. HTML source MUST validate, regardless of whether the DOM is valid once JavaScript has loaded
2. HTML source may be INVALID as long as the DOM is valid after JavaScript has loaded.

This is something that must have come up before but I am sorry to say I cannot find the answer.

I suspect, since:
a). browsers change the DOM
https://css-tricks.com/dom/#article-header-id-0

and,
b). some browsers are less capable than others and so some may fail to ‘mend’ some invalid HTML
that I probably have to follow position 1. since it is unequivocal.

Thanks for any wisdom you can share.

Cheers,

Alan

Alan Bristow
Web Programmer
Policy and Public Affairs
Elections Canada
Desk 9-A-053
30 Victoria Street, Gatineau, QC K1A 0M6
alan.bristow@elections.ca<mailto:alan.bristow@elections.ca>
Tel.: 819-939-2232

Received on Thursday, 10 January 2019 21:56:56 UTC