hCaptcha is a fairly popular captcha solution (see a demo.
Their systems works roughly like this:
- Websites add a div to a form with a sitekey and also add hCaptcha's JavaScript
- hCaptcha adds an iframe and 2 textareas to the form.
- When a visitor solves the hCaptcha, the two textareas are filled with a token that is submitted to the site
- The site can send the token in a server-to-server call to verify the user passed the captcha
The texteares added in step 2 look like this:
<textarea id="h-captcha-response-0da5o6pd30l5" name="h-captcha-response" style=""></textarea>
<textarea id="g-recaptcha-response-0da5o6pd30l5" name="g-recaptcha-response" style=""></textarea>
According to the pa11y these textareas are not accessible. Screen readers need to know that these form elements are not meant for human input, but are instead just for the functioning of the site. I believe one solution could be to add the HTML attribute aria-hidden="true"
to both of these textarea elements.
Is there any solution that consumers of hCaptcha can do? Or what would the best thing for hCaptcha be?