Add aria-hidden="true" when hiding the dev toast (#4990)

This commit is contained in:
Soheil Alizadeh authored and GitHub committed 2025-11-19 12:55:57 -08:00
1 parent 6df20ef3f7
commit 49234deacf
2 files changed
+6 -2

No files matched your search

+3 -1
View File
@@ -109,6 +109,7 @@
document.getElementById("__dx-toast-text").innerText = headerText; document.getElementById("__dx-toast-text").innerText = headerText;
document.getElementById("__dx-toast-msg").innerText = message; document.getElementById("__dx-toast-msg").innerText = message;
document.getElementById("__dx-toast-inner").style.right = "0"; document.getElementById("__dx-toast-inner").style.right = "0";
document.getElementById("__dx-toast").removeAttribute("aria-hidden");
document.getElementById("__dx-toast").addEventListener("click", closeDXToast); document.getElementById("__dx-toast").addEventListener("click", closeDXToast);
@@ -144,6 +145,7 @@
// Close the current toast. // Close the current toast.
function closeDXToast() { function closeDXToast() {
document.getElementById("__dx-toast-inner").style.right = "-1000px"; document.getElementById("__dx-toast-inner").style.right = "-1000px";
document.getElementById("__dx-toast").setAttribute("aria-hidden", "true");
clearTimeout(currentTimeout); clearTimeout(currentTimeout);
} }
@@ -161,7 +163,7 @@
</script> </script>
</head> </head>
<body> <body>
<div id="__dx-toast" class="dx-toast"> <div id="__dx-toast" class="dx-toast" aria-hidden="true">
<div id="__dx-toast-inner" class="dx-toast-inner" style="right:-1000px;"> <div id="__dx-toast-inner" class="dx-toast-inner" style="right:-1000px;">
<div class="dx-toast-level-bar-container"> <div class="dx-toast-level-bar-container">
<div id="__dx-toast-decor" class="dx-toast-level-bar __info"></div> <div id="__dx-toast-decor" class="dx-toast-level-bar __info"></div>
+3 -1
View File
@@ -107,6 +107,7 @@
document.getElementById("__dx-toast-text").innerText = headerText; document.getElementById("__dx-toast-text").innerText = headerText;
document.getElementById("__dx-toast-msg").innerText = message; document.getElementById("__dx-toast-msg").innerText = message;
document.getElementById("__dx-toast-inner").style.right = "0"; document.getElementById("__dx-toast-inner").style.right = "0";
document.getElementById("__dx-toast").removeAttribute("aria-hidden");
document.getElementById("__dx-toast").addEventListener("click", closeDXToast); document.getElementById("__dx-toast").addEventListener("click", closeDXToast);
@@ -142,6 +143,7 @@
// Close the current toast. // Close the current toast.
function closeDXToast() { function closeDXToast() {
document.getElementById("__dx-toast-inner").style.right = "-1000px"; document.getElementById("__dx-toast-inner").style.right = "-1000px";
document.getElementById("__dx-toast").setAttribute("aria-hidden", "true");
clearTimeout(currentTimeout); clearTimeout(currentTimeout);
} }
@@ -160,7 +162,7 @@
<!-- CUSTOM HEAD --> <!-- CUSTOM HEAD -->
</head> </head>
<body> <body>
<div id="__dx-toast" class="dx-toast"> <div id="__dx-toast" class="dx-toast" aria-hidden="true">
<div id="__dx-toast-inner" class="dx-toast-inner" style="right:-1000px;"> <div id="__dx-toast-inner" class="dx-toast-inner" style="right:-1000px;">
<div class="dx-toast-level-bar-container"> <div class="dx-toast-level-bar-container">
<div id="__dx-toast-decor" class="dx-toast-level-bar __info"></div> <div id="__dx-toast-decor" class="dx-toast-level-bar __info"></div>