Skip to content

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