Automattic / Automattic/jetpack

Forms: Improve consistancy in html for consent and checkbox fields

Open
#41,526 1 comment 0 reactions 0 assignees View on GitHub
[Block] Form [Feature] Forms [Plugin] Jetpack [Pri] Low [Status] Auto-allocated Enhancement Triaged
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

Jetpack

### Quick summary

Currently the checkbox field and the "explicit" consent field have different HTML markup, even thought the end result is almost he same.
A checkbox and a label.

Checkbox

![Image](https://github.com/user-attachments/assets/b992be71-daa8-4915-95f7-b354880d5b90)

Consent Field.

![Image](https://github.com/user-attachments/assets/22964391-053d-4f61-a635-212cbbe98d9c)

It would be good to have these fields the same (expect for block specific classes) so that they are easier to style.

### Steps to reproduce

1. Add the forms block.
2. Add the checkbox block and the consent block ( select the "explicit" option in the block settings).
3. Notice that the html that was produce is different.

### Site owner impact

Fewer than 20% of the total website/platform users

### Severity

Moderate

### What other impact(s) does this issue have?

No revenue impact

### If a workaround is available, please outline it here.

_No response_

### Platform (Simple and/or Atomic)

Simple, Atomic, Self-hosted

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the forms block with a checkbox and an explicit consent field, then inspect the generated HTML for both fields. Compare their markup and identify where each field is rendered; done means the structures match apart from block-specific classes and remain styleable consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
wordpress
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.