I have had an accessibility check done on my site and it found that the iframe surrounding the image created for reCaptcha has a title attribute, but no alt attribute. Is there a way to add one? This is needed for screen readers to identify the image.
I've tried going through Google's developer's site to see if there is any documentation about this or guides, and nothing addressed it. So it sent me to Stack Overflow.
Here is the code to add recaptcha, which I should have included with my original question:
<script src="google.com/recaptcha/…>
<script>
function onClick(e) {
e.preventDefault();
grecaptcha.ready(function() {
grecaptcha.execute('reCAPTCHA_site_key', {
action: 'submit'
}).then(function(token) { // Add your logic to submit to your backend server here. }); }); }
</script>
aria-labelattribute works?