ambethia / recaptcha

ReCaptcha helpers for ruby apps
http://github.com/ambethia/recaptcha
MIT License
1.97k stars 440 forks source link

id on textarea causes duplicate ids if recaptcha_tags is called twice on the same page #439

Closed jcoyne closed 8 months ago

jcoyne commented 8 months ago

Our automated accessibility check is giving a warning about this. https://github.com/ambethia/recaptcha/blob/master/lib/recaptcha/helpers.rb#L77

Could that ID be derived from options[:id] if present?

Is there a reason that element needs an id?

grosser commented 8 months ago

check the id is not used in the js ... if that's the case PR welcome to make it unique

jcoyne commented 8 months ago

check the id is not used in the js

This is in the <noscript> section.

grosser commented 8 months ago

then it should be fine