Skip to content

fix(a11y): make meeting-minutes modal keyboard-operable - #690

Open
Daksha1611 wants to merge 1 commit into
containers:mainfrom
Daksha1611:fix/modal-keyboard-trap
Open

fix(a11y): make meeting-minutes modal keyboard-operable#690
Daksha1611 wants to merge 1 commit into
containers:mainfrom
Daksha1611:fix/modal-keyboard-trap

Conversation

@Daksha1611

Copy link
Copy Markdown

Description

This fixes a keyboard accessibility issue in the meeting-minutes modal.

The dialog is now controlled using the native showModal() and close() APIs instead of toggling the open attribute, restoring built-in modal behavior such as closing with Escape. The close icon was also replaced with a semantic <button>, making it focusable and operable with the keyboard.

Verified that:

  • Pressing Escape closes the modal.
  • The close button is keyboard accessible.
  • The dialog opens as a native modal (:modal).

Fixes #686.

The dialog was toggled via the `open` attribute instead of showModal()/close(),
so Escape didn't close it and the close icon was a non-focusable <div onClick>.
Keyboard-only users had no way to close the modal once opened.

- Drive the dialog with showModal()/close() so native Escape-to-close and
  focus-trapping work, and sync state back via the dialog's onClose event.
- Replace the close-icon <div onClick> with a real <button> so it's reachable
  and operable via keyboard.

Verified with a headless Chrome session driving real keyboard/focus events:
Escape and Enter-on-close-button both close the modal, and the dialog now
opens via showModal() (matches :modal).

Fixes containers#686

Signed-off-by: Daksha1611 <mehtadaksha1611@gmail.com>
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.

[Bug]: Meeting-minutes modal is a keyboard trap — Escape does not close it and the close button is not focusable

1 participant