WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Fw: Regarding checkboxes and radio buttons that are not input elements

for

From: Jesse Hausler
Date: May 9, 2012 10:20AM


Here's the example that my colleague Thomas Sola put together.

Description:

The Javascript looks for checkboxes that we want to change into "fake" checkboxes in order to style them. It hides the real checkbox offscreen and adds a SPAN element that is styled to look like a checkbox.

Then the JS looks for the "change" event on that checkbox. When it changes it checks to see what the checkboxes state is and changes the classes on the fake checkbox accordingly.

One caveat: this has only been checked on FF and Chrome.

Jesse

--
Jesse Hausler
Sr. Accessibility Specialist | salesforce.com
Tel (415) 536-8902 | Mobile (703) 798-0903 | Fax (415) 944-1762