Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility consideration for honeypot fields #263

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Stolzenhain
Copy link

Quoting feature request on a similar Wordpress form helper:

Include the aria-hidden="true" attribute on the element to hide the honeypot from assistive technologies

Add labels to honeypot inputs for accessibility

While it's possibly dangerous to add more markup to honeypot fields, using a screen reader should still enable you to submit forms.

Quoting feature request on a similar Wordpress form helper:

> Include the aria-hidden="true" attribute on the <label> element to hide the honeypot from assistive technologies

— [Add labels to honeypot inputs for accessibility](https://wordpress.org/support/topic/add-to-honeypot-inputs-for-accessibility/#post-17278587)

While it's possibly dangerous to add more markup to honeypot fields, using a screen reader should still enable you to submit forms.
@mzur
Copy link
Owner

mzur commented Jun 3, 2024

Thank you for your contribution! I'm torn about this. While this would give bots a hint, support for screen readers is obviously also important. Maybe this could be implemented opt-out with an additional argument of the honeypot_field() method? If someone wants extra obscurity against bots, they could disable the aria attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants