From a786946aed21fa674451aa56b3fc252ba6803903 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Thu, 2 Jun 2022 18:38:27 -0700 Subject: [PATCH] refactor(modal): set alert dialog attributes in markup --- src/Modal/Modal.svelte | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Modal/Modal.svelte b/src/Modal/Modal.svelte index 67047417..9a59beb3 100644 --- a/src/Modal/Modal.svelte +++ b/src/Modal/Modal.svelte @@ -139,16 +139,6 @@ $: ariaLabel = modalLabel || $$props["aria-label"] || modalAriaLabel || modalHeading; - let alertDialogProps = {}; - $: if (alert) { - if (passiveModal) { - alertDialogProps.role = "alert"; - } - if (!passiveModal) { - alertDialogProps.role = "alertdialog"; - alertDialogProps["aria-describedby"] = modalBodyId; - } - } $: if (open) { addModalId(id); } else { @@ -214,9 +204,9 @@ >