Aria-hidden on a Honey Pot field

I have a honey pot input field on a form to prevent bots from submitting it, hidden with absolute positioning. I would like assistive technologies such as screen readers to ignore the honey pot field, so I added the aria-hidden="true" to it.

Will adding the aria-hidden="true" attribute to my honey pot field prevent bots from filling it in, similar to adding a "display:none" property? Or will they still fall for the trap and fill in the field?

Answers


Form fields are tab focusable, so while adding aria-hidden will not cause the field to be announced, it will still receive focus when a screen reader user tabs through the page.

This will cause confusion because the screen reader will not read out any label for the field. To solve this problem, you could add tabindex="-1" to take the field out of the natural tab order. I am not sure, however, whether that will cause it to be ignored by the bots.


Will adding the aria-hidden="true" attribute to my honey pot field prevent bots from filling it in?

No. They read Stackoverflow like everyone. After reading your message, they will update their algorithm and ignore aria-hidden=true fields ;-)

Of course not. As long as this solution can be skirted, writing it publicly does not give you the benefit of security through obscurity.

EDIT: added a smiley (but this is however a serious answer)

EDIT 2: added a second sentence for people lacking of humor


Need Your Help

Facebook Connect icon isn't showing up in Internet Explorer

javascript ruby-on-rails ajax internet-explorer facebook

I'm working on a site that is using Facebook Connect and recently made some changes so that the main pages are cached and if you are not logged in (checked with an ajax call) it loads the Facebook

Remove \" escape characters from string for XmlReader

c# xml string xml-parsing

I am creating an XmlReader from a string. This string contains an XML feed in string format.