Skip to content

'Captcha:' shows in form #259

Answered by cpattersonit
timfidd asked this question in Q&A
Discussion options

You must be logged in to vote

Another (more accessible) way to do this would be to use JavaScript to insert a class that keeps the label for screen readers but hides it otherwise::

$("label[for=id_captcha]").addClass("sr-only");

This example relies on jQuery and Bootstrap, but you could roll your own solution to accomplish the same thing.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by thibaudcolas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #197 on January 26, 2022 22:00.