improve accessibility

This commit is contained in:
Pete Matsyburka authored and Pete Matsyburka committed 2026-04-19 10:08:16 +03:00
1 parent 0af6ccf35f
commit ee65a5693c
40 files changed
+408 -181

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
export default class extends HTMLElement {
connectedCallback () {
const dialog = document.getElementById(this.dataset.target)
this.querySelector('button').addEventListener('click', () => {
if (dialog) {
dialog.inert = false
dialog.showModal()
}
})
if (dialog) {
dialog.addEventListener('close', () => {
dialog.inert = true
})
}
}
}