Phenomenon
The required attribute, which works on form inputs to indicate mandatory fields, is not supported on contenteditable regions. There is no built-in way to mark a contenteditable as required for form validation.
Reproduction example
- Create a contenteditable div with
requiredattribute inside a form. - Try to submit the form without entering content.
- Observe whether validation occurs.
Observed behavior
- In Chrome on macOS, the
requiredattribute is ignored on contenteditable. - Form validation does not check contenteditable regions.
- No built-in validation exists.
Expected behavior
- The
requiredattribute should work on contenteditable. - Form validation should check contenteditable regions.
- Or, there should be a standard way to validate contenteditable content.