0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 05:42:36 +08:00
discourse/app/assets/stylesheets/common
Renato Atilio c211bcbbd6
FIX: Enforce required validation on form template composer fields (#42192)
The composer field type backed its value with an `<input
type="hidden">`, which the HTML spec excludes from constraint
validation. `required` had no effect there, and the component never set
it in the first place: it only read `validations.required` to draw the
asterisk.

`form.checkValidity()` therefore always passed for these fields. When
the composer field was the only one in the template, the generated post
body came out empty and submission was stopped by a falsy-string check
with no visible error. When other fields had content, the body was
non-empty and the topic was created with the required field still blank.

Backs the field with a visually hidden text input carrying `required`,
as every other field type does, and dispatches an `input` event on it
when the editor changes so the shared validation logic can clear the
error tip.

That input is `aria-hidden`, so the invalid state and the error tip
attached to it were unreachable by assistive technology. It is now
treated as a validation proxy: its state is mirrored onto the real
editor through `aria-invalid` and `aria-describedby`, the message is
announced through the `a11y` service, and the editor is labelled by the
field label. Switching between markdown and rich modes replaces the
editor element, so that state is reapplied rather than toggled in place.
2026-08-04 16:07:51 -03:00
..
base FEATURE: adds pin topic node action to workflows (#42300) 2026-08-04 13:43:34 +02:00
components FIX: Enforce required validation on form template composer fields (#42192) 2026-08-04 16:07:51 -03:00
float-kit WIP: New "Post Type" dropdown in composer header (#38068) 2026-06-01 14:40:36 -05:00
form-kit DEV: simplify and use reuable components in invite modal, fix bug, (#42273) 2026-08-03 15:31:55 -04:00
foundation UX: add 2 border-radius vars (#41346) 2026-07-01 22:17:40 +02:00
login UX: Improve password manager and full name handling in code login (#41746) 2026-07-15 10:43:03 -07:00
modal UX: allow overflow for group-add-members-modal (#42304) 2026-08-04 12:55:11 +02:00
rich-editor UX: Dismiss alt text input when clicking image instead of opening lightbox (#40777) 2026-06-11 08:05:05 -03:00
select-kit UX: Disable ACL grantee row when all permissions banned (#41865) 2026-07-23 10:44:42 +10:00
table-builder UX: make table edit element fixed visible on tablets (#38686) 2026-03-18 12:28:39 +01:00
upcoming-changes UX: UC: composer redesign > prevent accidental clicks to close expanded editor (#42160) 2026-07-30 14:23:52 +02:00
d-editor.scss UX: Indicate when the emoji picker category list is scrollable (#41858) 2026-07-21 11:18:35 -03:00
font-variables.scss UX: don't show solved blockquote fade/expansion if unneeded (#39715) 2026-05-04 18:11:59 -04:00
input_tip.scss
loading-slider.scss UX: fix route loading spinner alignment (#37411) 2026-01-30 15:13:06 -05:00
nested-view.scss FIX: Add small action controls to nested activity log (#42108) 2026-07-29 10:19:47 -05:00
post-action-feedback.scss
printer-friendly.scss
software-update-prompt.scss
tokens.scss UX: follow-up badge color fix for dark palettes (#39807) 2026-05-06 14:30:40 -04:00
toolbar-popup-menu-options.scss FEATURE: Add a small text option to the composer text sizes toolbar button (#42020) 2026-08-03 11:28:59 +02:00
topic-entrance.scss
topic-timeline.scss REVERT: "FEATURE: Topic timeline for nested replies view (#40125)" (#40202) 2026-05-20 13:20:46 -05:00
whcm.scss