Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25801

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

    XMLWordPrintable

Details

    • Unknown

    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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Lucas C Charpentier Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: