Skip to content

feat: improve input modal#148

Merged
wendyyuchensun merged 2 commits into
coseeing:mainfrom
wendyyuchensun:a11y/modal-validation-focus
Jun 29, 2026
Merged

feat: improve input modal#148
wendyyuchensun merged 2 commits into
coseeing:mainfrom
wendyyuchensun:a11y/modal-validation-focus

Conversation

@wendyyuchensun

@wendyyuchensun wendyyuchensun commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • BasicModal 新增可選用的 asForm 屬性,且當 asForm=true 時,「確認」按鈕改為 type="submit",讓使用者在任一欄位按 Enter 即可送出填答內容。
  • 為所有網址欄位設定為 type="url",讓 input 的語意更完整。
  • 當送出的欄位驗證失敗時,將焦點移至第一個有錯誤的欄位。

wendyyuchensun and others added 2 commits June 21, 2026 16:02
…dals

Set type="url" on all URL fields (link, embed, target) for correct mobile
keyboards and semantics. Add noValidate to the modal <form> so custom,
translated, role="alert" error messaging stays the single validation path
instead of the browser's transient native bubbles. On a failed submit, move
focus to the first invalid field across the iframe, link, and image modals
so keyboard and screen-reader users are taken to the error rather than left
on the submit button.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@wendyyuchensun wendyyuchensun changed the title feat: make insert modals real forms with accessible validation feat: make input modal more accessible Jun 21, 2026
@wendyyuchensun wendyyuchensun changed the title feat: make input modal more accessible feat: improve input modal Jun 21, 2026
@wendyyuchensun wendyyuchensun merged commit 4827c97 into coseeing:main Jun 29, 2026
1 check passed
@wendyyuchensun wendyyuchensun deleted the a11y/modal-validation-focus branch June 29, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants