wip: wcag structure
Some checks failed
/ Run tests (push) Successful in 7m57s
/ Run system tests (push) Failing after 4m18s
/ Build, push and deploy image (push) Failing after 59s

This commit is contained in:
david 2025-05-16 19:02:33 +02:00
parent 4c31dbbed0
commit 4dd445be57
48 changed files with 461 additions and 137 deletions

View file

@ -4,7 +4,11 @@ import * as bootstrap from "bootstrap"
// Connects to data-controller="toast"
export default class extends Controller {
connect() {
const toastBootstrap = bootstrap.Toast.getOrCreateInstance(this.element)
toastBootstrap.show()
const shownKey = `toastsShown[${this.element.getAttribute("data-ts")}]`
if(!window.sessionStorage.getItem(shownKey)) {
window.sessionStorage.setItem(shownKey, Date.now());
const toastBootstrap = bootstrap.Toast.getOrCreateInstance(this.element)
toastBootstrap.show()
}
}
}