@@ -13,6 +13,7 @@ export function LooperPanel() {
1313 < >
1414 { /* Floating Toggle Button */ }
1515 { isOpen ? null : < motion . button
16+ type = "button"
1617 onClick = { ( ) => setIsOpen ( ! isOpen ) }
1718 className = { `fixed bottom-24 right-6 z-30 w-12 h-12 rounded-full shadow-2xl flex items-center justify-center transition-colors bg-primary text-primary-foreground ` }
1819 whileHover = { { scale : 1.1 } }
@@ -119,12 +120,12 @@ function LoopTrackCard({
119120 < span className = "text-xs font-bold font-mono text-muted-foreground" > LOOP { track . id } </ span >
120121 < div className = "flex items-center gap-2" >
121122 { hasLoop && track . url && (
122- < button onClick = { handleDownload } className = "text-muted-foreground hover:text-primary transition-colors" title = "Download Loop" >
123+ < button type = "button" onClick = { handleDownload } className = "text-muted-foreground hover:text-primary transition-colors" title = "Download Loop" >
123124 < Download size = { 14 } />
124125 </ button >
125126 ) }
126127 { hasLoop && (
127- < button onClick = { onClear } className = "text-muted-foreground hover:text-destructive transition-colors" title = "Clear Loop" >
128+ < button type = "button" onClick = { onClear } className = "text-muted-foreground hover:text-destructive transition-colors" title = "Clear Loop" >
128129 < Trash2 size = { 14 } />
129130 </ button >
130131 ) }
@@ -136,30 +137,31 @@ function LoopTrackCard({
136137 < div className = "flex items-center gap-2 justify-center relative" >
137138 { /* Record / Stop Record */ }
138139 { isRecording ? (
139- < button onClick = { onStopRecord } className = "w-8 h-8 rounded-full bg-red-500 text-white flex items-center justify-center shadow-lg hover:scale-105 active:scale-95 transition-all" >
140+ < button type = "button" onClick = { onStopRecord } className = "w-8 h-8 rounded-full bg-red-500 text-white flex items-center justify-center shadow-lg hover:scale-105 active:scale-95 transition-all" title = "Stop Recording" aria-label = "Stop Recording ">
140141 < Square size = { 12 } fill = "currentColor" />
141142 </ button >
142143 ) : (
143- < button onClick = { onRecord } disabled = { hasLoop } className = "w-8 h-8 rounded-full bg-background border border-border text-red-500 flex items-center justify-center hover:bg-red-500 hover:text-white disabled:opacity-20 disabled:hover:bg-background disabled:hover:text-red-500 transition-all" >
144+ < button type = "button" onClick = { onRecord } disabled = { hasLoop } className = "w-8 h-8 rounded-full bg-background border border-border text-red-500 flex items-center justify-center hover:bg-red-500 hover:text-white disabled:opacity-20 disabled:hover:bg-background disabled:hover:text-red-500 transition-all" title = "Record Loop" aria-label = "Record Loop ">
144145 < Mic size = { 14 } />
145146 </ button >
146147 ) }
147148
148149 { /* Play / Stop */ }
149150 { hasLoop && (
150151 isPlaying ? (
151- < button onClick = { onStop } className = "w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center shadow-lg hover:scale-105 active:scale-95 transition-all" >
152+ < button type = "button" onClick = { onStop } className = "w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center shadow-lg hover:scale-105 active:scale-95 transition-all" title = "Stop Playback" aria-label = "Stop Playback ">
152153 < Square size = { 12 } fill = "currentColor" />
153154 </ button >
154155 ) : (
155- < button onClick = { onPlay } className = "w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center shadow-lg hover:scale-105 active:scale-95 transition-all" >
156+ < button type = "button" onClick = { onPlay } className = "w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center shadow-lg hover:scale-105 active:scale-95 transition-all" title = "Play Loop" aria-label = "Play Loop ">
156157 < Play size = { 14 } fill = "currentColor" className = "ml-0.5" />
157158 </ button >
158159 )
159160 ) }
160161
161162 { /* Volume Button */ }
162163 < button
164+ type = "button"
163165 onClick = { handleClick }
164166 onContextMenu = { ( e ) => { e . preventDefault ( ) ; setShowVolume ( ! showVolume ) ; } }
165167 onTouchStart = { handleTouchStart }
@@ -200,6 +202,7 @@ function LoopTrackCard({
200202 value = { track . volume }
201203 onChange = { ( e ) => onVolume ( Number ( e . target . value ) ) }
202204 className = "w-full origin-center accent-primary cursor-pointer bg-white/20 rounded-full appearance-none"
205+ aria-label = "Loop Volume"
203206 />
204207 < span className = "text-[10px] font-mono font-bold" > { track . volume } dB</ span >
205208 </ motion . div >
0 commit comments