Problem/Motivation
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
- label
- div.description
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.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
login-form-captcha.png | 28.07 KB | Anybody |
Issue fork captcha-3357694
Show commands
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