|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Jun 2008
Location: Andy lives in London, UK
Posts: 261
|
Hidden field in form
I've been adding a field into forms and then hiding it with display: none
If a spam bot comes across the form it automatically fills in the field and which is then rejected after validation For the purpose of stopping spam bots it seems to be pretty successful However, how does this level with accessibility? Any advice is welcome. |
|
|
|
|
|
#2 |
|
SitePoint Zealot
![]() ![]() Join Date: Aug 2009
Posts: 166
|
Wow thats a good idea to fight spam bots.
|
|
|
|
|
|
#3 | |
|
SitePoint Mentor
![]() ![]() Join Date: Sep 2005
Location: Sydney, NSW, Australia
Posts: 9,620
|
Quote:
|
|
|
|
|
|
|
#4 |
|
SitePoint Mentor
![]() Join Date: Feb 2009
Location: England, UK
Posts: 4,416
|
It should be fine, screen readers tend to ignore anything using display: none so they would skip over the hidden field (which is of no use to them anyway).
![]() |
|
|
|
|
|
#5 | |
|
Site Point Member
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Aug 2007
Location: Netherlands
Posts: 2,676
|
Uh, no. JAWS can ignore display: none when it comes to labels and other special circumstances. I hate they did that, but whatever. Labels get read out... I'd have to go back and check Juicy Studio to see if Window Eyes did that too.
*edit only problem with it is the age, but my JAWS10 reads out display: none labels still: http://juicystudio.com/article/scree...splay-none.php Quote:
If I make a post on the Fronteers site, they use Javascript to hide a question. Since i don't have that on, I get an extra field. The label says "NEE invullen" (fill in NO) but I misread it and thought it said "NIET invullen" (don't fill in) so I kept triggering the spam filter, lawlz. This can also work since most bots don't process Javascript. On a moving site I haz: Code:
<label for="spamz" id="spamvraag"><span>AUB <strong>Niet invullen</strong>, dit is een anti-spam vraag:</span> <input type="text" id="spamz" name="spamz" title="aub niet invullen!"></label> One thing I might want to look out for are smarter bots who might be scanning the label for the word "spam" though. I mean, if I made such bots I'd consider adding something like that : ) |
|
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 19:50.













Linear Mode
