feat(member): bring the overview table up to WCAG 2.2 AA

This commit is contained in:
Simon 2026-07-06 10:49:10 +02:00
parent 0c375234c8
commit c2cb3edab8
6 changed files with 91 additions and 39 deletions

View file

@ -36,6 +36,22 @@ function getBrowserTimezone() {
// Hooks for LiveView components
let Hooks = {}
// IndeterminateCheckbox: the `indeterminate` state of a checkbox is a JS
// property, not an HTML attribute, so it cannot be set from the server render.
// Mirror it from the data-indeterminate attribute on mount and every update
// (e.g. select-all reflecting a partial selection — WCAG select-all semantics).
Hooks.IndeterminateCheckbox = {
updateIndeterminate() {
this.el.indeterminate = this.el.dataset.indeterminate === "true"
},
mounted() {
this.updateIndeterminate()
},
updated() {
this.updateIndeterminate()
}
}
// CopyToClipboard hook: Copies text to clipboard when triggered by server event
Hooks.CopyToClipboard = {
mounted() {