1
I am developing a form that will be accessible. For this, the captcha field I am doing this way:
<div class="control-group">
<div class="controls">
<?php
$codigoCaptcha = substr(md5(time()) ,0, 5);
if(!isset($_SESSION["Captcha"])){
$_SESSION["Captcha"] = $codigoCaptcha;
}
echo "<div id='captcha'>".$_SESSION["Captcha"]."</div>";
?>
<input type="text" class="form-control" name="Captcha" title="Digite o código <?php echo $_SESSION["Captcha"]; ?>" required />
</div>
</div>
....
</html>
<?php unset($_SESSION["Captcha"]); ?>
The screen reader can read the captcha correctly, but if we type wrong the captcha it sends. It is possible to create a validation through HTML5 for this case, remembering that the screen reader only reads (as far as I know) the required fields?
You wouldn’t have to do a validation via Javascript to see if the code was correctly typed?
– Sam
Hello dvd. I tried to validate the form in Javascript, but the screen reader did not read it as clearly as it does in HTML5 validation and this can confuse a little who needs accessibility.
– user24136