'

[Irl-dean] Creating accessible javascript

drice at nda.ie drice at nda.ie
Fri Sep 29 12:00:21 IST 2006


Gez,
excellent feedback - just the sort we were looking for during the 
consultation period.  This consultation period is over but we still have a 
little time before finalisation.  I will review and incorporate your 
feedback as appropriate.

> JavaScript in and of itself does not create accessibility barriers when 
used correctly.
> If it's used incorrectly, then like any technology (including HTML),
> the result is likely to be inaccessible.

The page in question "Use JavaScript wisely" at <
http://www.nda.bunnyfoot.co.uk/developers/dev_design_basics_tech/design_tech2.3.html
> starts with "Use JavaScript by all means...".  We never intended to give 
the impression that JavaScript is automatically 'bad' for accessibility. 
The statement "Reliance on JavaScript is an accessibility issue in itself" 
does not reflect the nuances you outlined.  However it is an issue where 
the browser does not support it or it is turned off.  Still, good points - 
will review and amend.

> Accessibility isn't solely the responsibility of the web developer.
> Developers, user agent (including AT) vendors, and users themselves
> all have a role to play. The User Agent Accessibility Guidelines
> (UAAG) requires that an accessible user agent provides programmatic
> access to the content [1]. I completely agree that reliance on
> JavaScript is not a good practice; I just disagree that it's an
> accessibility issue.

Will review an amend as above.


> This means that advice that advocates doubling up on event handlers now
> results in them being executed twice when activated with the keyboard,
> as the click activated version must also be able to be activated by
> the keyboard, as per the UAAG requirement  (there are workarounds to
> this contradictory advice, but the advice and example on the NDA page
> makes no mention of them).

Thanks for this.  I would appreciate a pointer to this advice or examples 
of workarounds. 

> On the subject of not relying on JavaScript, I'm also surprised to see
> you advocate the noscript tag, as it's such a clumsy mechanism that's
> more often than not inadequate for providing an alternative;
> particularly considering that scripting is behavioural in nature,
> whereas the noscript element assumes that scripting will be used
> purely for creating content. When content is created with scripting,
> progressive enhancement (destroying the non-JavaScript mechanism if
> present, and recreating the scripting alternative with scripting
> itself) is far more efficient than the clumsy noscript method. The
> noscript example provided on the NDA page suggests that a choice of
> red, green, or blue is an equivalent for a colour picker, whereas a
> typical 8-bit RGB colour picker will typically offer 16,777,216
> different colours rather than a choice of one colour from three
> alternatives.

Its a simple example to illustrate a point which I think it does 
effectively.  However your comments on the use of no-script in general are 
fair - there is more detailed advice required here, I think.  To be honest 
I had not heard the term 'progressive enhancement' used before even though 
I know what it refers to.  I will endeavour to incorporate the concept 
into this advice.
> 
> > The following is an example of a page that we developed for the Oasis
> > website that uses Javascript in a form in an accessible way:
> > http://www.oasis.gov.ie/service_finder/
> 
> The prompt "town" is not marked up in a label
> element, and is not associated with its form control, so should be far
> from being considered accessible. It's exactly these types of
> considerations that must be included before scripting solutions can be
> considered accessible.

Correct - I will pass this observation onto the Oasis web team.

Regards,
Dónal Rice.
"The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. It is the policy of the National Disability Authority to disallow the sending of offensive material and should you consider that the material contained in this message is offensive you should contact the sender immediately and also mailminder at nda.gov.ie".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.universaldesign.ie/pipermail/ceud-ict/attachments/20060929/422e2d5b/attachment.html 


More information about the CEUD-ICT mailing list