From b9eb393e6fe151d40e95cfc594c795725d2fe9a2 Mon Sep 17 00:00:00 2001 From: Clay Miller Date: Wed, 14 Jan 2026 15:04:08 -0500 Subject: [PATCH] fix: Check for ':modal' selector support before using it --- arianotify-polyfill.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arianotify-polyfill.js b/arianotify-polyfill.js index 48db582..7f3182b 100644 --- a/arianotify-polyfill.js +++ b/arianotify-polyfill.js @@ -58,7 +58,7 @@ if (!("ariaNotify" in Element.prototype) || !("ariaNotify" in Document.prototype // If there is a modal element on the page, everything outside of it is implicitly inert. // This can be checked by seeing if the element is within the modal, if the modal is present. (this.element.ownerDocument - .querySelector(":modal") + .querySelector(CSS.supports("selector(:modal)") ? ":modal" : "dialog[open]") ?.contains(this.element) ?? true) );