[Accessibility_sig] JavaScript Checkbox Help Needed
James Craig
james at cookiecrook.com
Sun Feb 25 18:58:04 CST 2007
McMillen, Node wrote:
> I added an alert to the checkbox that tells the
> user to uncheck the box and "select an answer from a, b, c or d listed
> below." However, if the person does uncheck the box, they get the alert
> again and have to click OK again. Our designers/developers believe this
> will be disconcerting for the users. Does anyone know a fix for this
> problem, a self close for the alert box, . . . ?
You have developers that don't know how to fix this? I'd suggest
hiring someone that knows JavaScript.
By your description I assume you've added something like this:
onclick="alert('uncheck me')"
If thatt's the case, you can switch it to do what you want by changing it to:
onclick="if (this.checked) alert('uncheck me')"
However, your accessibility problem comes not from the alerts but from
the fact that you're using checkboxes for validation. I can't say for
sure since I haven't seen it, but you may want to reconsider the user
experience aspect of your web app.
James
More information about the Accessibility_sig
mailing list