-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
<trix-editor>
currently accepts autofocus
and placeholder
attributes, but not a required
attribute. It would be useful to add this in, to get the basic validation mechanism that HTML provides.
At the moment we're relying on Active Record validation to prevent users from submitting a form without filling in this field. We also have to add aria-required="true"
to notify screen reader users.
Steps to Reproduce
- Create a rich text area with
required: true
:<%= f.rich_text_area :about, class: "dm--input", required: true %>
- Try to submit the form without filling it out
- Notice that there's no HTML validation
Details
TrixRails version: 7.1.3- Browser name and version: Chrome version 123.0.6312.59 (Official Build) (arm64)
- Operating system: MacOS 14.4
Metadata
Metadata
Assignees
Labels
No labels