WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Is any use of document.write a violation of WCAG 2.0 1.3.1 (or only if it is used to dynamically create new content after the page has loaded)?

for

From: Benjamin Hawkes-Lewis
Date: Feb 2, 2012 12:21AM


On Thu, Feb 2, 2012 at 1:11 AM, Glenda Sims < <EMAIL REMOVED> > wrote:
> Oh wise and wonderful Accessibility Experts,
>
> I'm pretty sure I know the answer to this question...but I need to make
> sure I'm accurate by getting some 2nd opinions.  I believe that the use of
> document.write is perfectly acceptable and meets WCAG 2.0 1.3.1
> requirements....when it is used to build a web page, as the page is loading
> the first time.
>
> Now, if you start using document.write after the page has fully loaded, to
> dynamically change content on the page, then, you can get in trouble and be
> out of compliance with WCAG 2.0 1.3.1.
>
> The item I'm trying to clarify is down at the bottom of the Testing Technique
> in SCR21:  Using functions of the DOM to add content to a page at
> http://www.w3.org/TR/2012/NOTE-WCAG20-TECHS-20120103/SCR21

Not passing a test case of any particular (informative) technique does
not automatically put you out of compliance with a normative
requirement. Using document.write does not automatically mean that
"Information, structure, and relationships that are conveyed through
presentation can" not "be programmatically determined or are
available in text, and that's the only test you need to pass to comply
with 1.3.1.

--
Benjamin Hawkes-Lewis