feat: enhance accessibility by adding ARIA attributes and focus styles; improve canvas and button elements

This commit is contained in:
syntaxbullet
2026-07-11 11:28:57 +02:00
parent 53cf25c132
commit d8fdd43416
8 changed files with 89 additions and 18 deletions

View File

@@ -42,7 +42,14 @@ export function CanvasViewport({
const hasBrushPreview = Boolean(cursorState.hasBrushPreview && !brushHint && canPreviewBrush(cursorState.document, cursorState.editor));
const cursorClass = canvasCursorClass(cursorState.editor.tools.interactionMode, cursorState.isPanning, hasBrushPreview, !brushHint);
return <canvas ref={canvasRef} className={`h-full w-full ${cursorClass}`} />;
return (
<canvas
ref={canvasRef}
className={`h-full w-full touch-none ${cursorClass}`}
role="img"
aria-label="Image editing canvas. Use the tools and layers controls to edit the document."
/>
);
}
type CanvasCursorState = {