WebAIM - Web Accessibility In Mind

E-mail List Archives

best way to use <a href> and javascript?

for

From: kieran_guckian@smartforce.com
Date: Oct 29, 2002 5:25AM


Hi all, I was looking for view opinions on this one.
Ive seen before in lots of lists not to use <a href="javascript:function
();">read notes</a> for the reason that screenreaders will read out the
javascript function when they execute the link.
An example often given to fix this is <a href="page.html" onClick
="window.open('page.html');">read notes</a>.
What if you are not linking to a new page though. What if your script is
for rewriting the content of a div.
What can you put in the href if you want to use the onClick method?
Ive used <a href="#" onClick="function();">read notes</a>
Jaws reads this as "link same page read notes" which I know is not good
enough.
How are people getting around this one, Id appreciate any thoughts,
Thanks Kieran

**************************************************************************************************
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or the
sender immediately and do not disclose the contents to any one or make copies.

** eSafe scanned this email for viruses, vandals and malicious content **
**************************************************************************************************


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/