I'm currently working on a honeypot solution to prevent spam in my site that consists in adding a few fields with random names and hiding them with CSS by adding style="display : none;"
in the HTML element. When submitted, if any of these fields is not empty -as it should- it means that a spambot just submitted the form. That or a malicious user. Either way, the post is rejected.
Now, this would work perfectly but I'm assuming that all users have browsers that support CSS.
Deleting via JavaScript every field that has the CSS display
attribute equal to none
could prevent browsers with no CSS support from displaying the supposedly hidden fields.
So, this would work fine for browsers that support:
- both CSS and JavaScript
- only CSS
- only JavaScript
My question is, then, do browsers for the blind or any other accessibility-targeted browser support CSS and JavaScript, only CSS, only JavaScript or none?