diff --git a/static/app.js b/static/app.js index 82c2010..2dfb050 100644 --- a/static/app.js +++ b/static/app.js @@ -276,9 +276,12 @@ function openSuppressModal(type, name, detail) { updateSuppressForm(); lt.modal.open('suppress-modal'); - document.querySelectorAll('#suppress-modal .pill').forEach(p => p.classList.remove('active')); + document.querySelectorAll('#suppress-modal .pill').forEach(p => { + p.classList.remove('active'); + p.setAttribute('aria-pressed', 'false'); + }); const manualPill = document.querySelector('#suppress-modal .pill-manual'); - if (manualPill) manualPill.classList.add('active'); + if (manualPill) { manualPill.classList.add('active'); manualPill.setAttribute('aria-pressed', 'true'); } const hint = document.getElementById('duration-hint'); if (hint) hint.textContent = 'Suppression will persist until manually removed.'; } @@ -297,8 +300,11 @@ function updateSuppressForm() { function setDuration(mins, el) { document.getElementById('sup-expires').value = mins || ''; - document.querySelectorAll('#suppress-modal .pill').forEach(p => p.classList.remove('active')); - if (el) el.classList.add('active'); + document.querySelectorAll('#suppress-modal .pill').forEach(p => { + p.classList.remove('active'); + p.setAttribute('aria-pressed', 'false'); + }); + if (el) { el.classList.add('active'); el.setAttribute('aria-pressed', 'true'); } const hint = document.getElementById('duration-hint'); if (hint) { if (mins) { diff --git a/templates/base.html b/templates/base.html index 21a4576..ec49357 100644 --- a/templates/base.html +++ b/templates/base.html @@ -231,12 +231,12 @@