keyboard contracts and spoken strings for the a11y layer
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user