diff --git a/src/components/AIChat.tsx b/src/components/AIChat.tsx index 5c59965..cada2d1 100644 --- a/src/components/AIChat.tsx +++ b/src/components/AIChat.tsx @@ -73,12 +73,12 @@ export function AIChat({ currentCode }: AIChatProps) { return (
- +
- -
+ +
{messages.map((message, index) => (
-

+

Press Enter to send, Shift+Enter for new line

diff --git a/src/components/FileTree.tsx b/src/components/FileTree.tsx index 3627a6f..2d96d8f 100644 --- a/src/components/FileTree.tsx +++ b/src/components/FileTree.tsx @@ -147,13 +147,27 @@ export function FileTree({ return (
handleDragStart(e, node)} onDragOver={(e) => handleDragOver(e, node)} onDragLeave={handleDragLeave} onDrop={(e) => handleDrop(e, node)} onDragEnd={handleDragEnd} - className={`flex items-center gap-1 px-2 py-1.5 md:py-1 hover:bg-muted/60 cursor-pointer group rounded-sm transition-colors touch-manipulation ${ + onKeyDown={(e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + if (node.type === 'folder') { + toggleFolder(node.id); + } else { + onFileSelect(node); + } + } + }} + className={`flex items-center gap-1 px-2 py-1.5 md:py-1 hover:bg-muted/60 cursor-pointer group rounded-sm transition-colors touch-manipulation focus:outline-none focus:ring-2 focus:ring-accent focus:ring-offset-1 ${ isSelected ? 'bg-accent/30 text-accent font-semibold' : 'text-foreground' } ${isDragging ? 'opacity-50' : ''} ${isDropTarget && node.type === 'folder' ? 'bg-blue-500/20 border-2 border-blue-500 border-dashed' : ''}`} style={{ paddingLeft: `${depth * 10 + 8}px` }} @@ -234,6 +248,7 @@ export function FileTree({ size="icon" className="h-6 w-6" title="New File" + aria-label="Create new file" onClick={() => { const name = prompt('Enter file name:'); if (name) { @@ -241,7 +256,7 @@ export function FileTree({ } }} > - +
diff --git a/src/components/SearchInFilesPanel.tsx b/src/components/SearchInFilesPanel.tsx index 6558aac..c1244bb 100644 --- a/src/components/SearchInFilesPanel.tsx +++ b/src/components/SearchInFilesPanel.tsx @@ -119,16 +119,16 @@ export function SearchInFilesPanel({
- +
-
@@ -142,9 +142,10 @@ export function SearchInFilesPanel({ if (e.key === 'Enter') handleSearch(); }} className="flex-1" + aria-label="Search query" /> -
@@ -156,6 +157,7 @@ export function SearchInFilesPanel({ checked={caseSensitive} onChange={(e) => setCaseSensitive(e.target.checked)} className="rounded" + aria-label="Case sensitive search" /> Case sensitive @@ -179,8 +181,17 @@ export function SearchInFilesPanel({ {results.map((result, index) => (
handleResultClick(result)} - className="p-2 rounded hover:bg-muted/60 cursor-pointer group transition-colors border border-transparent hover:border-accent/30" + onKeyDown={(e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + handleResultClick(result); + } + }} + aria-label={`Open ${result.fileName} at line ${result.line}`} + className="p-2 rounded hover:bg-muted/60 cursor-pointer group transition-colors border border-transparent hover:border-accent/30 focus:outline-none focus:ring-2 focus:ring-accent focus:ring-offset-1" >