web: improve screen reader usability

- switchers now have audible states
- toggles are now interpreted as toggles
- fixed weird spacing introduced in last commit
This commit is contained in:
wukko
2024-07-03 14:09:09 +06:00
parent 5ced7b5388
commit a478993599
3 changed files with 4 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
export let big: boolean = false;
</script>
<div id="switcher-container" class="switcher" class:big={big}>
<div id="switcher-container" class="switcher" class:big={big} role="listbox">
<slot></slot>
</div>
@@ -18,7 +18,7 @@
}
.switcher :global(.button) {
white-space: pre;
white-space: nowrap;
}
.switcher:not(.big) :global(.button:first-child) {