Drupal captcha

Image captcha is made up from two modules in drupal - captcha and textimage. I have patched textimage for this site to make it work a little differently:

  • Added a check for empty POST, if empty don't perform the "POST" validate. This worked around the invalid captcha warnings I got before the first validate
  • Changed vertical jitter to make it jitter from a central point not per character (dyslexic friends found the per character jitter difficult, although this should probably be an option)
  • Made setting scratches to zero render no scratches (rather than one)
  • Added an option to crop the background images to text size rather than crop by default (as I wanted a fixed background image for a logo)
  • Added an "alt captcha" that puts a maths captcha in the image alternative text for increased accessibility (e.g. screen readers and text browsers should still be able to add comments). This probably needs more thought, but it works for the moment.

I passed these small patches onto Fabiano (the modules' maintainer) in case he finds any interesting/useful for inclusion.

I have just found another problem/issue I will need to look into - if you don't accept cookies the captcha appears not to work and, what's worse, it doesn't tell you any reason why (i.e. that it needs cookies). Should it really need cookies for a simple captcha submission?

I think the captcha modules need an overhaul, and possibly a rethink so as to address accessibilities issues better than my hack above, remove the need for cookies, and possibly with a better plug-in system where different forms of captcha can be easily slotted in?