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

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 20:36:03 UTC