I've updated the CRIR (Checkbox and Radio Input Replacement) script. Based on a tip left by Adam Burmister on my last blog post, The updates add keyboard support to the script. Basically instead of hiding the input element I just move it off the screen. This allows you to still use your keyboard to tab to each element and use your spacebar to check / uncheck checkboxes, and you can use the up and down arrow keys to control groups of radio buttons. I've also fixed a few minor bugs that we're brought to my attention.
This was the one major flaw with the CRIR script and I'm glad to have it fixed. Be sure to go download the lastest updates.
Thanks again for the tip Adam.
Last weekend I spent some time cleaning up a script that I had written that would hide Checkbox and Radio Button Inputs and allow you to add CSS styling to the label element. I decided that I would post the script on digg.com to help raise some awareness and drive traffic to the script. In the first 24 hours I received 42 diggs and I was in the top 3 most popular stories in their upcoming stories section. I was quite happy about this moderate success, however was thrilled to see the response the next day.
Yesterday, The day after I added the script to digg, CRIR ended up on delicious, stumbleupon, reddit, cssdrive, and a handful of blogs. I honestly couldn't believe how well received this script was and how much traffic my site was getting because of this one small script. The script was on the popular page at delicious all day, it was in the top 50 on reddit most of the day, it received over 1500 thumbs up on stumbleupon, and people were leaving some great comments about the script all over the place. By the end of the day yesterday 4600 people from all over the globe had visited my site to check out the script, and as I write this at 1:00 pm there has been over 1500 people visiting today. This is a huge increase from the 30 - 50 visitors I get on an average day.
I also received an email from Jesse Gavin this morning informing me that he made some improvements to the script. He converted to script JSON (JavaScript Object Notation) and included an AddEvent function which eliminates the need to initialize the script using body onload. I've uploaded these updates to the script so be sure to go grab the latest version of the script.
With the amount of attention the scipt was recieving it was normal to get some critism. Some skeptical people said that because the inputs no longer look like traditional Checkboxes or Radio Buttons it would be hard for people to understand that elements are clickable inputs. While this may be true with the sample that I provided, it's up to the designer/developer that's using the script to make the inputs appear more like the traditional inputs. The script allows the designer/developer to get creative and design Checkboxes and Radio Buttons that match the rest their site's design. Other critisim was the fact that once the inputs are replaced you can no longer use your keyboard to tab to them and use the spacebar to check them. This is also very true and it may be something to fix later when I get ambitious.
I'm really looking forward to seeing what people do with the script. Be sure to drop me a line and let me know how you've used the script.
Go check out the script here: CRIR Checkbox and Radio Input Replacement