Resolve ARIA warning
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/push/build unknown status
ci/woodpecker/push/deploy unknown status

This commit is contained in:
2026-02-16 10:29:07 -03:00
parent 7870d3b3bd
commit 0f2dba0ce7
2 changed files with 3 additions and 1 deletions

View File

@@ -9,7 +9,7 @@
class="lightbox" class="lightbox"
aria-hidden="true" aria-hidden="true"
aria-describedby="lb-caption" aria-describedby="lb-caption"
closedby="any" inert
> >
<header> <header>
<button type="button" class="lb-close" aria-label="Close" <button type="button" class="lb-close" aria-label="Close"

View File

@@ -51,6 +51,7 @@ function openLightbox(name, type, caption) {
</picture>`; </picture>`;
} }
lbCaption.textContent = caption || ''; lbCaption.textContent = caption || '';
dialog.removeAttribute('inert');
dialog.setAttribute('aria-hidden', 'false'); dialog.setAttribute('aria-hidden', 'false');
dialog.showModal(); dialog.showModal();
} }
@@ -65,6 +66,7 @@ function closeLightbox() {
if (lbContent) lbContent.innerHTML = ''; if (lbContent) lbContent.innerHTML = '';
if (lbCaption) lbCaption.textContent = ''; if (lbCaption) lbCaption.textContent = '';
dialog.setAttribute('aria-hidden', 'true'); dialog.setAttribute('aria-hidden', 'true');
dialog.setAttribute('inert', '');
dialog.close(); dialog.close();
} }