This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-4bf4c9bb-2ede-461f-9ae9-dc005cc27acc XWIKI-25801 Open

The registration CAPTCHA answer field is not associated with its CAPTCHA label

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-c81d578d-bdfa-476e-92e1-9d48886b6c64 Charpentier Lucas created this issue on 19/Nov/26 11:26
 
Summary: The registration CAPTCHA answer field is not associated with its CAPTCHA label
Issue Type: cid:jira-generated-image-avatar-4bf4c9bb-2ede-461f-9ae9-dc005cc27acc Bug
Affects Versions: 11.9
Assignee: Unassigned
Components: CAPTCHA - JCaptcha, Web - Templates & Resources
Created: 19/Nov/26 11:26
Labels: wcag
Priority: cid:jira-generated-image-static-major-8902f563-b370-4405-9ef3-5eb1e8e44ace Major
Reporter: Charpentier Lucas
Description:

Steps to reproduce:

  1. As an administrator, go to Administration > Users & Rights > Registration and tick "Require CAPTCHA to register".
  2. Log out and open the registration form (Drawer > Register).
  3. 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.