Skip to content

More accessible captcha labels#3193

Open
Crabcyborg wants to merge 1 commit into
masterfrom
more_accessible_captcha_labels
Open

More accessible captcha labels#3193
Crabcyborg wants to merge 1 commit into
masterfrom
more_accessible_captcha_labels

Conversation

@Crabcyborg

@Crabcyborg Crabcyborg commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Related ticket https://secure.helpscout.net/conversation/3386866379/255259

Fixes this WAVE issue.

The CAPTCHA inputs are always in an iframe, so a label can't actually direct to any inputs.

Screenshot 2026-07-16 at 1 58 21 PM

In this update,

  1. If the label position is set to "None" (the default value), the label is removed altogether.
  2. If the label position is not set to "None", the label element is converted to a span tag.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

CAPTCHA label shortcode replacement now removes labels configured as none and converts other CAPTCHA labels from <label> elements to <span> elements.

Changes

CAPTCHA label rendering

Layer / File(s) Summary
Conditional label HTML rewrite
classes/models/fields/FrmFieldCaptcha.php
before_replace_html_shortcodes() conditionally removes the CAPTCHA label or replaces its <label> markup with <span> markup using regular expressions.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: improving CAPTCHA label accessibility.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch more_accessible_captcha_labels

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Crabcyborg
Crabcyborg requested a review from garretlaxton July 16, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant