feat: add dismiss (×) button to all toast notifications (#1355) (#1755)

* feat: add dismiss (×) button to all toast notifications (#1355)

* Refresh README presentation

* fix: reset pointer-events on toast dismiss button click

Action toasts set pointer-events:auto on #toast for their clickable
button, but the × close-button handler only cleared the auto-hide timer
without resetting pointer-events. This left an invisible fixed overlay
blocking clicks in the top-right area after manual dismissal.

- Add pointerEvents reset in both showToast and showError close handlers
- Add DOM behavior tests for pointer-events across all toast types

---------

Co-authored-by: pewdiepie-archdaemon <pewdiepie-archdaemon@users.noreply.github.com>
This commit is contained in:
Rishi Sharma
2026-06-26 18:32:35 +05:30
committed by GitHub
parent a5b60a34ee
commit 6ee51b6b10
4 changed files with 230 additions and 32 deletions
+10
View File
@@ -54,3 +54,13 @@ def test_styled_dialogs_manage_focus():
assert _UI.count("_prevFocus && _prevFocus.focus && _prevFocus.focus()") == 2
assert _UI.count("e.key === 'Tab'") == 2
def test_toast_has_dismiss_button():
"""Both showToast and showError must include a close button with aria-label."""
# Read fresh every time so edits to ui.js are picked up
ui = (_REPO / "static" / "js" / "ui.js").read_text(encoding="utf-8")
assert "toast-close-btn" in ui
assert "aria-label" in ui
assert "Dismiss" in ui
assert ui.count("toast-close-btn") >= 2