Case ce-0063-contenteditable-with-required · Scenario scenario-required-validation

required attribute is not supported for validation

OS: Windows 11 Device: Desktop Any Browser: Chrome 120.0 Keyboard: US Status: confirmed
required validation form chrome

Phenomenon

When marking a contenteditable container as required, the browser’s form validation engine does not check its content. Users can submit an empty editor even if it’s logically “mandatory”.

Reproduction Steps

  1. Create a <form>.
  2. Add <div contenteditable="true" required></div>.
  3. Add a submit button.
  4. Leave the div empty and click submit.
  5. Observe that the form submits without showing a “Please fill out this field” tooltip.

Expected Behavior

The browser should ideally support native validation for editable regions or provide a focused pseudo-class for validation states.

Solution

Use a hidden input with the required attribute and sync its value, or use the checkValidity() API manually on form submission.

Playground for this case

Use the reported environment as a reference and record what happens in your environment while interacting with the editable area.

Reported environment
OS: Windows 11
Device: Desktop Any
Browser: Chrome 120.0
Keyboard: US
Your environment
Sample HTML:
Event log
Use this log together with the case description when filing or updating an issue.
0 events
Interact with the editable area to see events here.

Comments & Discussion

Have questions, suggestions, or want to share your experience? Join the discussion below.