mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-30 00:22:10 -04:00
* 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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user