Repository navigation
fix(a11y): use native form submission paths #835
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
13
commits into
main
Choose a base branch
from
codex/native-form-submit-v2
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
13 commits
Select commit
Hold shift + click to select a range
3d7d948
fix(a11y): use native form submission paths
seonghobae 7dd402e
fix(a11y): name search landmarks
seonghobae e24952f
test(a11y): cover native form guards
seonghobae b16ab83
test(frontend): await diagram list before fake timers
seonghobae 56897f0
chore: merge protected main into native-form branch
seonghobae 3ca75ed
Merge protected main into native form submission
seonghobae b27f673
merge(main): refresh native form accessibility slice
seonghobae a001eeb
Merge branch 'main' into codex/native-form-submit-v2
seonghobae 4235640
Merge branch 'main' into codex/native-form-submit-v2
seonghobae 3069dde
test: stabilize native form regression coverage
seonghobae 660988e
docs: record native form frontend behavior
seonghobae 2be4584
Merge main into native form accessibility branch
seonghobae 963295b
chore: remove unrelated drift from accessibility PR
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # Native form submission and search behavior | ||
|
|
||
| ## Status | ||
|
|
||
| Implemented in the authenticated React application. This is an accessibility | ||
| and interaction contract, not a conformance certification. | ||
|
|
||
| ## Creation forms | ||
|
|
||
| The editor project creator, project-list inline creator, and editor connection | ||
| creator are semantic HTML `form` elements. Their action buttons use | ||
| `type="submit"`; click and Enter therefore converge on the same handler rather | ||
| than dispatching duplicate request paths. | ||
|
|
||
| Each submit handler prevents browser navigation and calls the existing async | ||
| operation. Production guards remain authoritative: | ||
|
|
||
| - trimmed empty project names never call the API; | ||
| - a connection requires a selected project, non-empty name and secret DSN; | ||
| - the DSN must satisfy the existing PostgreSQL/Postgres/Snowflake URL policy; | ||
| - the password field is cleared before any connection request and after an | ||
| invalid DSN, so the secret is not retained in React state; and | ||
| - `isCreatingProject` and `isCreatingConnection` prevent a second Enter or | ||
| click while the first request is active. | ||
|
|
||
| Native required-field attributes were not introduced because the product's | ||
| existing disabled-state, contextual-hint, trimming, and DSN policy provide the | ||
| current validation contract. This change does not alter DSN authority, | ||
| authentication, API payloads, polling, status rendering, or dependencies. | ||
|
|
||
| ## Search forms | ||
|
|
||
| Diagram and canvas search controls are semantic forms with `role="search"`. | ||
| The landmarks have distinct accessible names (`다이어그램 검색` and | ||
| `ERD 캔버스 검색`) so assistive-technology users can identify the intended | ||
| search region rather than encountering anonymous search landmarks. | ||
| Their submit handler only calls `preventDefault()`. Enter therefore cannot | ||
| navigate or reload the page, while the controlled input and existing live | ||
| filter remain unchanged. The accessible labels and visible layout are | ||
| preserved. | ||
|
|
||
| ## Failure and recovery | ||
|
|
||
| API failures continue through the existing application error boundary. A | ||
| failed operation re-enables its submit control in `finally`, allowing a | ||
| corrected retry. Invalid connection input is rejected before API access. Search | ||
| submission has no durable side effect and needs no recovery procedure. | ||
|
|
||
| ## Acceptance evidence | ||
|
|
||
| `frontend/src/App.coverage.test.tsx` uses real keyboard events against rendered | ||
| application forms. It proves whitespace-only project rejection, exact-once | ||
| editor and project-list Enter submission, invalid DSN rejection and secret | ||
| clearing, exact-once connection submission, async re-entry blocking, semantic | ||
| search roles, and preserved live filtering. Existing click tests prove that | ||
| pointer activation uses the same path. | ||
|
|
||
| ## References | ||
|
|
||
| Web Hypertext Application Technology Working Group. (2026). *HTML living | ||
| standard: Forms*. https://html.spec.whatwg.org/multipage/forms.html | ||
|
|
||
| World Wide Web Consortium. (2023). *Web Content Accessibility Guidelines | ||
| (WCAG) 2.2: Guideline 2.1 keyboard accessible*. | ||
| https://www.w3.org/TR/WCAG22/#keyboard-accessible |
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.