Closed (fixed)
Project:
CAPTCHA
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 May 2023 at 17:05 UTC
Updated:
23 May 2023 at 07:29 UTC
Jump to comment: Most recent
Currently CAPTCHA 2.x uses a structure like this for the description:
<fieldset data-drupal-selector="edit-captcha" class="captcha captcha-type-challenge--recaptcha">
<div class="captcha__description">This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.</div>
<div class="captcha__element">
<input data-drupal-selector="edit-captcha-sid" type="hidden" name="captcha_sid" value="yyy">
<input data-drupal-selector="edit-captcha-token" type="hidden" name="captcha_token" value="xxx">
...
</div>
</fieldset>but instead it seems it would make more sense to perhaps use the same structure as Drupal uses for form fields with
so that the default style applies.
A good example is the login form: /user/login which currently looks like this, (if no label is used):

I'd instead expect the long text as description and the label (if set) as label.
We should hurry up to improve this, as long as 2.x isn't that widely used. It will be a BC anyway, but won't hurt that much, if we do it early.
| Comment | File | Size | Author |
|---|---|---|---|
| login-form-captcha.png | 28.07 KB | anybody |
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
anybodyComment #4
anybodyComment #5
anybodyI think this default makes most sense :)
If anyone needs custom solutions, it can be overwritten. But this way the default style applies. What do you think @thomas.frobieter?
Comment #6
thomas.frobieterYeah, its okay for me
Comment #8
thomas.frobieterComment #9
anybodyWorks super great, thank you! :)
Comment #10
anybody-.- forgot to fix the tests accordingly! I'll do that now.
Comment #12
anybody