keyboard contracts and spoken strings for the a11y layer

This commit is contained in:
2026-08-20 15:26:00 +03:00
parent a2938e0d64
commit 306c15de65
7 changed files with 172 additions and 61 deletions
+15 -13
View File
@@ -199,19 +199,21 @@ export default function MultiplayerPanel({ onClose }: { onClose: () => void }) {
// already selected, do nothing
} else {
const rect = e.currentTarget.getBoundingClientRect()
const canvas = document.createElement('canvas')
canvas.style.cssText = 'position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:9999'
document.body.appendChild(canvas)
const myConfetti = confetti.create(canvas, { resize: true })
myConfetti({
particleCount: 60,
spread: 70,
startVelocity: 25,
origin: {
x: (rect.left + rect.width / 2) / window.innerWidth,
y: (rect.top + rect.height / 2) / window.innerHeight,
},
}).then(() => canvas.remove())
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
const canvas = document.createElement('canvas')
canvas.style.cssText = 'position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:9999'
document.body.appendChild(canvas)
const myConfetti = confetti.create(canvas, { resize: true })
myConfetti({
particleCount: 60,
spread: 70,
startVelocity: 25,
origin: {
x: (rect.left + rect.width / 2) / window.innerWidth,
y: (rect.top + rect.height / 2) / window.innerHeight,
},
}).then(() => canvas.remove())
}
}
}}
>