Repository navigation
🎨 Palette: Add visual indicators for required form fields in modals #930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
seonghobae
wants to merge
49
commits into
main
Choose a base branch
from
palette-ux-required-fields-2840570704280580839
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
c9b9d87
feat(ux): Add visual indicators for required form fields
seonghobae b472f26
fix: enforce required modal fields
seonghobae 66bb435
feat(ux): Add visual indicators for required form fields
seonghobae 2906c22
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 4a64e03
test(ux): fix failing test cases by matching label correctly with regex
seonghobae c3b0de9
Merge branch 'main' into palette-ux-required-fields-2840570704280580839
seonghobae ec24bc0
Merge branch 'main' into palette-ux-required-fields-2840570704280580839
seonghobae aaffad0
fix(a11y): enforce required modal fields
seonghobae 2349db9
test: cover required modal fields and frontend advisory
seonghobae 57b673c
Merge remote-tracking branch 'origin/main' into HEAD
seonghobae 1cf1a6a
test: close frontend coverage gaps
seonghobae ae5ab8f
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 7f168b4
fix: retain required field coverage and guards
seonghobae cb17746
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 2543dff
fix: enforce required modal input validation
seonghobae be5a839
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 8829b36
fix: restore required modal validation coverage
seonghobae 4f37dbf
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 78c8edc
fix: restore modal validation and complete coverage
seonghobae 06e562a
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 3e4088e
Revert "test(ux): fix failing test cases by matching label correctly …
seonghobae 48f2f48
test: stabilize frontend coverage suite
seonghobae 55d530e
test(ux): fix failing test cases by matching label correctly with regex
seonghobae e9cd0cf
Revert "test(ux): fix failing test cases by matching label correctly …
seonghobae cc66e59
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 9f3879c
Revert "test(ux): fix failing test cases by matching label correctly …
seonghobae 0dd3ae1
fix(ux): restore required-field validation and dependency pins
seonghobae 30a52df
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 812e2b8
Revert "test(ux): fix failing test cases by matching label correctly …
seonghobae eaa426d
test(ux): allow complete editor coverage run
seonghobae 778f08c
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 591e0c9
fix(ux): preserve dependency security and required field coverage
seonghobae 6ad886a
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 6b7eed0
fix(ux): reject whitespace-only modal fields
seonghobae d81c331
Merge remote-tracking branch 'origin/palette-ux-required-fields-28405…
seonghobae ec395cd
fix(ux): restore required-field release and dependency guards
seonghobae b373b49
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 786ba51
fix: enforce required relation labels
seonghobae 4280922
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 7cb8854
test(ux): fix failing test cases by matching label correctly with regex
seonghobae 5dd6967
test(a11y): pin required modal validation contract
seonghobae 94737f9
fix(a11y): align required modal validation and remove drift
seonghobae 4ee42a5
fix(ux): explain invalid group names and document modal APIs
seonghobae ec67fdd
test(a11y): pin empty required-field guidance
seonghobae 0e18ea2
fix(a11y): preserve guidance for empty required fields
seonghobae 1dd642d
test(a11y): clean up DOM after required field validations tests
seonghobae 7752a7a
test(a11y): clean up DOM after required field validations tests
seonghobae d2fbf9b
docs(test): diagnose duplicate Testing Library matches accurately
seonghobae b92823c
docs(palette): update learning to treat multiple elements as query sc…
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Required modal field validation | ||
|
|
||
| ## Buyer problem | ||
|
|
||
| Several modal forms displayed a visual required marker while the executable constraint did not match it. In particular, relationship labels and business-group names could contain only whitespace: HTML `required` treats the empty string as missing, but whitespace is still a non-empty value. That mismatch made the UI promise stricter validation than the form actually enforced. | ||
|
|
||
| ## Product contract | ||
|
|
||
| - Native `required` remains the semantic baseline for every mandatory text input in this slice. | ||
| - Relationship labels and business-group names additionally reject whitespace-only values before the mutation callback runs. | ||
| - Empty relationship and group names receive the same actionable Korean guidance through the input's native invalid event; whitespace-only values receive equivalent guidance through the explicit trim guard. | ||
| - The business-group form also renders linked guidance while its Add action is disabled, so the customer can see the next action without needing to trigger an unavailable submit control. | ||
| - Changing either value clears the stale custom validity message immediately. | ||
| - The visual `*` is centralized in `RequiredIndicator`, uses the existing `--color-danger` token, and is `aria-hidden="true"` because the input itself carries the required semantics. | ||
| - No API, database, persistence, authorization, or deployment contract changes. | ||
|
|
||
| ## Design and accessibility authority | ||
|
|
||
| Fresh Figma evidence on 2026-08-30 confirms file `csnpEEJfmqFWB0vNUoTkWA`, page `190:2` (`Design System — Storybook Contract`), frame `190:40` (`Design Token Authority`), including `--color-danger = #b91c1c` and the instruction to change runtime source first, keep Storybook exact-value tests green, then resync Figma. The paired executable Storybook token inventory is currently owned by PR #944 at exact head `ffcf653e78306563797262678a4313c8215a5932` and renders exact token values as text while marking decorative previews `aria-hidden`. | ||
|
|
||
| This PR reuses that shared token contract rather than adding a local color. It does not claim a current Storybook component-state story for required-field validation: the protected base does not yet contain #944. Therefore design acceptance remains fail-closed until the required-field state is represented against the then-current paired Figma and Storybook authority before merge. | ||
|
|
||
| ## Verification | ||
|
|
||
| Focused tests pin semantic `required` state for add-table, relationship, group, table-title, column-name, and column-type inputs; empty and whitespace-only validation guidance; whitespace-only mutation blocking; linked visible group guidance; clearing stale custom validity; and the decorative marker's exclusion from the accessibility tree. Existing modal coverage continues to exercise valid submit/cancel/delete flows. | ||
|
|
||
| ## Standards traceability | ||
|
|
||
| The HTML Standard defines `required` as a boolean constraint and treats a required mutable input whose value is the empty string as missing. The same standard exposes `setCustomValidity()` and `reportValidity()` for constraints beyond the native empty-string rule. WAI-ARIA 1.2 specifies that elements with `aria-hidden="true"` should not be included in the accessibility tree; the marker is non-focusable decoration, not the semantic source of required state. | ||
|
|
||
| ### References | ||
|
|
||
| WHATWG. (2026). *HTML Standard*. Retrieved August 30, 2026, from https://html.spec.whatwg.org/ | ||
|
|
||
| World Wide Web Consortium. (2023). *Accessible Rich Internet Applications (WAI-ARIA) 1.2* (W3C Recommendation, June 6, 2023). https://www.w3.org/TR/wai-aria-1.2/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.