-
+
{Math.round(effects.distortion.wet * 100)}%
-
+
BPM
{tempo}
@@ -142,6 +148,12 @@ export function TransportBar({
onMouseUp={handleDragEnd}
onMouseLeave={handleDragEnd}
title="Drag up/down to adjust swing"
+ role="slider"
+ aria-label="Swing"
+ aria-valuemin={0}
+ aria-valuemax={100}
+ aria-valuenow={swing}
+ tabIndex={0}
>
Swing
{swing}%
diff --git a/app/src/components/Waveform.tsx b/app/src/components/Waveform.tsx
index a2a2ecc..f16e9b4 100644
--- a/app/src/components/Waveform.tsx
+++ b/app/src/components/Waveform.tsx
@@ -15,7 +15,9 @@ interface WaveformProps {
height?: number;
}
-export function Waveform({ buffer, slicePoints = [], onSlicePointsChange, onPlaySlice, height = 80 }: WaveformProps) {
+const EMPTY_SLICE_POINTS: number[] = [];
+
+export function Waveform({ buffer, slicePoints = EMPTY_SLICE_POINTS, onSlicePointsChange, onPlaySlice, height = 80 }: WaveformProps) {
const canvasRef = useRef(null);
const containerRef = useRef(null);
const [hoveredSlice, setHoveredSlice] = useState(null);
@@ -189,6 +191,8 @@ export function Waveform({ buffer, slicePoints = [], onSlicePointsChange, onPlay
onMouseDown={handleMouseDown}
onMouseUp={handleMouseUp}
onMouseLeave={handleMouseLeave}
+ role="img"
+ aria-label="Audio waveform"
>