File tree Expand file tree Collapse file tree
surfsense_web/components/tool-ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,10 +215,18 @@ function ReportCard({
215215 < div
216216 className = { `my-4 max-w-lg overflow-hidden rounded-2xl border bg-muted/30 transition-[box-shadow] duration-300 ${ isActive ? "ring-1 ring-primary/50" : "" } ` }
217217 >
218- < button
219- type = "button"
218+ { /* biome-ignore lint/a11y/useSemanticElements: can't use <button> here because PlateEditor renders nested <button> elements (e.g. CopyButton) */ }
219+ < div
220+ role = "button"
221+ tabIndex = { 0 }
220222 onClick = { handleOpen }
221- className = "w-full text-left transition-colors hover:bg-muted/50 focus:outline-none focus-visible:outline-none"
223+ onKeyDown = { ( e ) => {
224+ if ( e . key === "Enter" || e . key === " " ) {
225+ e . preventDefault ( ) ;
226+ handleOpen ( ) ;
227+ }
228+ } }
229+ className = "w-full text-left transition-colors hover:bg-muted/50 focus:outline-none focus-visible:outline-none cursor-pointer"
222230 >
223231 < div className = "px-5 pt-5 pb-4 select-none" >
224232 < p className = "text-sm font-semibold text-foreground line-clamp-2" >
@@ -264,7 +272,7 @@ function ReportCard({
264272 < p className = "text-sm text-muted-foreground italic" > No content available</ p >
265273 ) }
266274 </ div >
267- </ button >
275+ </ div >
268276 </ div >
269277 ) ;
270278}
You can’t perform that action at this time.
0 commit comments