You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<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
Trix Rails version: 7.1.3
Browser name and version: Chrome version 123.0.6312.59 (Official Build) (arm64)
Operating system: MacOS 14.4
The text was updated successfully, but these errors were encountered:
<trix-editor>
currently acceptsautofocus
andplaceholder
attributes, but not arequired
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
required: true
:<%= f.rich_text_area :about, class: "dm--input", required: true %>
Details
TrixRails version: 7.1.3The text was updated successfully, but these errors were encountered: