|
| Summary: |
The registration CAPTCHA answer field is not associated with its CAPTCHA label |
| Issue Type: |
Bug |
| Affects Versions: |
11.9 |
| Assignee: |
Unassigned |
| Components: |
CAPTCHA - JCaptcha, Web - Templates & Resources |
| Created: |
19/Nov/26 11:26 |
| Labels: |
wcag |
| Priority: |
Major |
| Reporter: |
Charpentier Lucas |
| Description: |
Steps to reproduce:
- As an administrator, go to Administration > Users & Rights > Registration and tick "Require CAPTCHA to register".
- Log out and open the registration form (Drawer > Register).
- Move the keyboard focus to the CAPTCHA answer field, with a screen reader running.
Expected results:
- The answer field is announced with the "CAPTCHA" label of the form and its instruction, "Please validate the CAPTCHA to prove you are not a robot".
- Once XWIKI-17625 is fixed, the field is also announced as required, matching the "(Required)" marker shown next to the label.
Actual results:
- The answer field is only named by its "Answer" placeholder.
- The "CAPTCHA" label has a for attribute pointing to captcha_placeholder, which is not the id of any element, so the label is not associated with the field. XWIKI-17625 drops that for attribute, which leaves the label unassociated too.
- The captchaAnswer input rendered by XWiki.Captcha.JCaptcha.Displayer has no id, no aria-labelledby and no aria-required, so the registration form has no way to tie its label or its required state to it.
The label is generated by #generateHtml in register_macros.vm for fields of type html, whose content comes from the CAPTCHA displayer, so a fix likely needs the displayer to accept an id or ARIA attributes, or the form to group the CAPTCHA content under its label. |
|