Fixed
Project:
CAPTCHA
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2025 at 11:03 UTC
Updated:
2 Nov 2026 at 21:33 UTC
Jump to comment: Most recent
When you set up your captcha field in webform and fill "Question title" then math captcha does not work caused by #3221197: Captcha Math question needs to be more accessible
If you leave Question title field empty then captcha works.
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
lamp5Comment #3
santanu mondal commentedComment #4
santanu mondal commentedComment #5
fantonThe problem occurs because the math question is now in the title, so overwriting it from the webform's captcha field causes the question to be lost.
See https://www.drupal.org/project/captcha/issues/3221197#comment-15298026
Comment #6
lamp5@fanton, I know, I liked this issue...
Comment #7
sapetm commented@fanton We're also experiencing this issue in version 2.0.10. I understand the root of the issue, but is there a plan for providing any documentation on how to format the Question title so that it can be appropriately localized while still displaying the math equation?
Comment #8
norman.lolTranslate as regular under
/admin/config/regional/translate. Search for "Math question".Comment #9
norman.lolLet's add an update hook at least running through all webforms (if any) and emptying the math captcha titles.
Comment #11
norman.lolComment #12
norman.lolIt would be more bullet proof if we could find a way to prevent the title from being set in the UI in the first place.
Comment #13
norman.lolComment #16
japerrySo at first, was going to say this needs to change in webform -- but they didn't break the contract, we did. Closing MR !134 as it would break things downstream.
The new MR fixes it in CAPTCHA, without undoing the accessibility fix. When the response field's title is no longer the one CAPTCHA generated, the sum is rendered as a field prefix and added to the input's aria-describedby, so it stays visible and is announced. Math challenges whose title hasn't been replaced render exactly as before, so existing translations of "Math question (@x + @y =)" keep working. A new functional test mimics Webform's override.
Comment #17
norman.lolUh that's a nice idea 💡
Comment #19
japerry