Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: improve accessibility across React components
Adam Eivy227ef02f871e
diff --git a/client/src/components/AppIcon.jsx b/client/src/components/AppIcon.jsxindex 665890ae48..5f0c57d38e 100644--- a/client/src/components/AppIcon.jsx+++ b/client/src/components/AppIcon.jsx@@ -168,9 +168,19 @@ export const iconNames = Object.keys(icons);export default function AppIcon({ icon, size = 24, className = '', ariaLabel }) {const IconComponent = icons[icon] || icons.package;- const iconName = icon || 'package';++ // If ariaLabel is provided, make it accessible; otherwise treat as decorative+ if (ariaLabel) {+ return (+ <span role="img" aria-label={ariaLabel}>+ <IconComponent size={size} className={className} />+ </span>+ );+ }++ // Decorative icon - hidden from assistive technologyreturn (- <span role="img" aria-label={ariaLabel || `${iconName} icon`} aria-hidden={!ariaLabel ? 'true' : undefined}>+ <span aria-hidden="true"><IconComponent size={size} className={className} /></span>);diff --git a/client/src/components/cos/TerminalCoSPanel.jsx b/client/src/components/cos/TerminalCoSPanel.jsxindex 5a1f26aa30..830052ab97 100644--- a/client/src/components/cos/TerminalCoSPanel.jsx+++ b/client/src/components/cos/TerminalCoSPanel.jsx@@ -134,16 +134,18 @@ export default function TerminalCoSPanel({ state, speaking, statusMessage, event<buttononClick={onStop}className="flex items-center gap-1 px-2 py-1 bg-red-900/30 hover:bg-red-900/50 text-red-400 rounded border border-red-700/50 text-xs transition-colors"+ aria-label="Stop CoS agent">- <Square size={10} />+ <Square size={10} aria-hidden="true" />stop</button>) : (<buttononClick={onStart}className="flex items-center gap-1 px-2 py-1 bg-green-900/30 hover:bg-green-900/50 text-green-400 rounded border border-green-700/50 text-xs transition-colors"+ aria-label="Start CoS agent">- <Play size={10} />+ <Play size={10} aria-hidden="true" />start</button>)}@@ -211,16 +213,18 @@ export default function TerminalCoSPanel({ state, speaking, statusMessage, event<buttononClick={onStop}className="flex items-center gap-2 px-3 py-1.5 bg-red-900/30 hover:bg-red-900/50 text-red-400 rounded border border-red-700/50 text-xs transition-colors"+ aria-label="Stop CoS agent">- <Square size={12} />+ <Square size={12} aria-hidden="true" />./stop</button>) : (<buttononClick={onStart}className="flex items-center gap-2 px-3 py-1.5 bg-green-900/30 hover:bg-green-900/50 text-green-400 rounded border border-green-700/50 text-xs transition-colors"+ aria-label="Start CoS agent">- <Play size={12} />+ <Play size={12} aria-hidden="true" />./start</button>)}diff --git a/client/src/components/cos/tabs/AgentCard.jsx b/client/src/components/cos/tabs/AgentCard.jsxindex bfb0f758f3..c621f86c89 100644--- a/client/src/components/cos/tabs/AgentCard.jsx+++ b/client/src/components/cos/tabs/AgentCard.jsx@@ -151,7 +151,7 @@ export default function AgentCard({ agent, onTerminate, onKill, onDelete, onResu<div className="p-4"><div className="flex items-center justify-between mb-2"><div className="flex items-center gap-2 flex-wrap">- <Cpu size={16} className={completed ? 'text-gray-500' : 'text-port-accent animate-pulse'} />+ <Cpu size={16} aria-hidden="true" className={completed ? 'text-gray-500' : 'text-port-accent animate-pulse'} /><span className="font-mono text-sm text-gray-400">{agent.id}</span>{isSystemAgent && (<span className="px-1.5 py-0.5 text-xs bg-gray-500/20 text-gray-400 rounded">SYS</span>@@ -177,7 +177,7 @@ export default function AgentCard({ agent, onTerminate, onKill, onDelete, onResu{!completed && processStats?.active && (<span className="flex items-center gap-1 px-2 py-0.5 text-xs rounded bg-port-success/20 text-port-success"title={`PID: ${processStats.pid} | State: ${processStats.state}`}>- <Activity size={10} />+ <Activity size={10} aria-hidden="true" />PID {processStats.pid} | {processStats.cpu?.toFixed(1)}% | {processStats.memoryMb}MB</span>)}@@ -185,7 +185,7 @@ export default function AgentCard({ agent, onTerminate, onKill, onDelete, onResu{!completed && agent.pid && processStats && !processStats.active && (<span className="flex items-center gap-1 px-2 py-0.5 text-xs rounded bg-port-error/20 text-port-error"title="Process is not running - zombie agent">- <Skull size={10} />+ <Skull size={10} aria-hidden="true" />PID {agent.pid} ZOMBIE</span>)}@@ -197,7 +197,7 @@ export default function AgentCard({ agent, onTerminate, onKill, onDelete, onResuclassName="flex items-center gap-1 text-sm text-gray-500"title={`Based on ${durationEstimate.basedOn} completed ${durationEstimate.taskType} tasks`}>- <Clock size={12} />+ <Clock size={12} aria-hidden="true" />{formatDuration(duration)} / ~{formatDuration(durationEstimate.estimatedMs)}</span>) : (@@ -207,6 +207,7 @@ export default function AgentCard({ agent, onTerminate, onKill, onDelete, onResu<buttononClick={() => setExpanded(!expanded)}className="text-gray-500 hover:text-white transition-colors text-xs"+ aria-expanded={expanded}>{expanded ? 'Hide' : 'Show'} Output</button>@@ -216,9 +217,9 @@ export default function AgentCard({ agent, onTerminate, onKill, onDelete, onResu<buttononClick={() => onTerminate(agent.id)}className="text-gray-500 hover:text-port-warning transition-colors"- title="Terminate (graceful SIGTERM)"+ aria-label="Terminate agent (graceful SIGTERM)">- <Square size={14} />+ <Square size={14} aria-hidden="true" /></button>)}{/* Kill button (force SIGKILL) */}@@ -227,18 +228,18 @@ export default function AgentCard({ agent, onTerminate, onKill, onDelete, onResuonClick={handleKill}disabled={killing}className="text-gray-500 hover:text-port-error transition-colors disabled:opacity-50"- title="Force Kill (SIGKILL)"+ aria-label="Force kill agent (SIGKILL)">- {killing ? <Loader2 size={14} className="animate-spin" /> : <Skull size={14} />}+ {killing ? <Loader2 size={14} aria-hidden="true" className="animate-spin" /> : <Skull size={14} aria-hidden="true" />}</button>)}{completed && !isSystemAgent && onResume && (<buttononClick={() => onResume(agent)}className="flex items-center gap-1 text-xs px-2 py-1 rounded bg-port-accent/20 text-port-accent hover:bg-port-accent/30 transition-colors"- title="Create new task from this agent's context"+ aria-label="Create new task from this agent's context">- <RotateCcw size={12} />+ <RotateCcw size={12} aria-hidden="true" />Resume</button>)}@@ -246,9 +247,9 @@ export default function AgentCard({ agent, onTerminate, onKill, onDelete, onResu<buttononClick={() => onDelete(agent.id)}className="text-gray-500 hover:text-port-error transition-colors"- title="Remove"+ aria-label="Remove agent">- <Trash2 size={14} />+ <Trash2 size={14} aria-hidden="true" /></button>)}</div>@@ -285,9 +286,9 @@ export default function AgentCard({ agent, onTerminate, onKill, onDelete, onResu{agent.result && (<div className={`text-sm flex items-center gap-2 ${agent.result.success ? 'text-port-success' : 'text-port-error'}`}>{agent.result.success ? (- <><CheckCircle size={14} /> Completed successfully</>+ <><CheckCircle size={14} aria-hidden="true" /> Completed successfully</>) : (- <><AlertCircle size={14} /> {agent.result.error || 'Failed'}</>+ <><AlertCircle size={14} aria-hidden="true" /> {agent.result.error || 'Failed'}</>)}</div>)}@@ -298,7 +299,7 @@ export default function AgentCard({ agent, onTerminate, onKill, onDelete, onResu<div className="border-t border-port-border bg-port-bg/50 p-3">{loadingOutput ? (<div className="flex items-center gap-2 text-gray-500 text-sm">- <Loader2 size={14} className="animate-spin" />+ <Loader2 size={14} aria-hidden="true" className="animate-spin" />Loading full output...</div>) : output.length > 0 ? (diff --git a/client/src/components/cos/tabs/AgentsTab.jsx b/client/src/components/cos/tabs/AgentsTab.jsxindex fdc903b53b..cd69aec61d 100644--- a/client/src/components/cos/tabs/AgentsTab.jsx+++ b/client/src/components/cos/tabs/AgentsTab.jsx@@ -109,8 +109,9 @@ export default function AgentsTab({ agents, onRefresh, liveOutputs, providers, a<buttononClick={handleClearCompleted}className="flex items-center gap-1 text-sm text-gray-500 hover:text-port-error transition-colors"+ aria-label="Clear all completed agents">- <Trash2 size={14} />+ <Trash2 size={14} aria-hidden="true" />Clear</button></div>diff --git a/client/src/components/cos/tabs/TaskItem.jsx b/client/src/components/cos/tabs/TaskItem.jsxindex cb23c56ff8..05142af08d 100644--- a/client/src/components/cos/tabs/TaskItem.jsx+++ b/client/src/components/cos/tabs/TaskItem.jsx@@ -14,10 +14,10 @@ import toast from 'react-hot-toast';import * as api from '../../../services/api';const statusIcons = {- pending: <Clock size={16} className="text-yellow-500" />,- in_progress: <Activity size={16} className="text-port-accent animate-pulse" />,- completed: <CheckCircle size={16} className="text-port-success" />,- blocked: <Ban size={16} className="text-port-error" />+ pending: <Clock size={16} aria-hidden="true" className="text-yellow-500" />,+ in_progress: <Activity size={16} aria-hidden="true" className="text-port-accent animate-pulse" />,+ completed: <CheckCircle size={16} aria-hidden="true" className="text-port-success" />,+ blocked: <Ban size={16} aria-hidden="true" className="text-port-error" />};export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh, providers, dragHandleProps }) {@@ -77,11 +77,9 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,<buttononClick={() => handleStatusChange(task.status === 'completed' ? 'pending' : 'completed')}className="mt-0.5 hover:scale-110 transition-transform"- title={task.status === 'completed' ? 'Mark as pending' : 'Mark as completed'}- aria-label={task.status === 'completed' ? 'Mark as pending' : 'Mark as completed'}+ aria-label={`Status: ${task.status}. Click to mark as ${task.status === 'completed' ? 'pending' : 'completed'}`}>- <span aria-hidden="true">{statusIcons[task.status]}</span>- <span className="sr-only">Status: {task.status}</span>+ {statusIcons[task.status]}</button><div className="flex-1 min-w-0"><div className="flex items-center gap-2 mb-1 flex-wrap">@@ -142,13 +140,13 @@ export default function TaskItem({ task, isSystem, awaitingApproval, onRefresh,onClick={handleSave}className="flex items-center gap-1 text-xs text-port-success hover:text-port-success/80">- <Save size={12} /> Save+ <Save size={12} aria-hidden="true" /> Save</button><buttononClick={() => setEditing(false)}className="flex items-center gap-1 text-xs text-gray-500 hover:text-white">- <X size={12} /> Cancel+ <X size={12} aria-hidden="true" /> Cancel</button></div></div>diff --git a/client/src/components/cos/tabs/TasksTab.jsx b/client/src/components/cos/tabs/TasksTab.jsxindex 0931f70523..2c17d8b8f9 100644--- a/client/src/components/cos/tabs/TasksTab.jsx+++ b/client/src/components/cos/tabs/TasksTab.jsx@@ -175,15 +175,17 @@ export default function TasksTab({ tasks, onRefresh, providers, apps }) {<buttononClick={() => setShowAddTask(!showAddTask)}className="flex items-center gap-1 text-sm text-port-accent hover:text-port-accent/80 transition-colors"+ aria-expanded={showAddTask}>- <Plus size={16} />+ <Plus size={16} aria-hidden="true" />Add Task</button><buttononClick={onRefresh}className="text-gray-500 hover:text-white transition-colors"+ aria-label="Refresh tasks">- <RefreshCw size={16} />+ <RefreshCw size={16} aria-hidden="true" /></button></div></div>@@ -255,7 +257,7 @@ export default function TasksTab({ tasks, onRefresh, providers, apps }) {onClick={() => fileInputRef.current?.click()}className="flex items-center gap-2 px-3 py-2 bg-port-bg border border-port-border rounded-lg text-gray-400 hover:text-white text-sm transition-colors">- <Image size={16} />+ <Image size={16} aria-hidden="true" />Add Screenshot</button><input@@ -265,6 +267,7 @@ export default function TasksTab({ tasks, onRefresh, providers, apps }) {multipleonChange={handleFileSelect}className="hidden"+ aria-label="Upload screenshot files"/>{screenshots.length > 0 && (<span className="text-xs text-gray-500">{screenshots.length} screenshot{screenshots.length > 1 ? 's' : ''} attached</span>@@ -284,8 +287,9 @@ export default function TasksTab({ tasks, onRefresh, providers, apps }) {type="button"onClick={() => removeScreenshot(s.id)}className="absolute -top-2 -right-2 w-5 h-5 bg-port-error rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity"+ aria-label={`Remove screenshot ${s.filename}`}>- <X size={12} />+ <X size={12} aria-hidden="true" /></button></div>))}@@ -305,7 +309,7 @@ export default function TasksTab({ tasks, onRefresh, providers, apps }) {onClick={handleAddTask}className="flex items-center gap-1 px-3 py-1.5 bg-port-accent/20 hover:bg-port-accent/30 text-port-accent rounded-lg text-sm transition-colors">- <Plus size={14} />+ <Plus size={14} aria-hidden="true" />Add</button></div>diff --git a/client/src/pages/Apps.jsx b/client/src/pages/Apps.jsxindex 0b1b8b0953..efc814b8b8 100644--- a/client/src/pages/Apps.jsx+++ b/client/src/pages/Apps.jsx@@ -155,8 +155,10 @@ export default function Apps() {<buttononClick={() => toggleExpand(app.id)}className="text-gray-400 hover:text-white transition-transform flex-shrink-0"+ aria-expanded={expandedId === app.id}+ aria-label={`${expandedId === app.id ? 'Collapse' : 'Expand'} ${app.name} details`}>- <span className={`inline-block transition-transform ${expandedId === app.id ? 'rotate-90' : ''}`}>▶</span>+ <span aria-hidden="true" className={`inline-block transition-transform ${expandedId === app.id ? 'rotate-90' : ''}`}>▶</span></button><div className="min-w-0 flex-1"><div className="flex flex-wrap items-center gap-2">@@ -194,18 +196,16 @@ export default function Apps() {onClick={() => handleStop(app)}disabled={actionLoading[app.id]}className="px-3 py-1.5 bg-port-error/20 text-port-error hover:bg-port-error/30 transition-colors disabled:opacity-50 flex items-center gap-1"- title="Stop">- <Square size={14} />+ <Square size={14} aria-hidden="true" /><span className="text-xs">Stop</span></button><buttononClick={() => handleRestart(app)}disabled={actionLoading[app.id]}className="px-3 py-1.5 bg-port-warning/20 text-port-warning hover:bg-port-warning/30 transition-colors disabled:opacity-50 border-l border-port-border flex items-center gap-1"- title="Restart">- <RotateCcw size={14} className={actionLoading[app.id] === 'restart' ? 'animate-spin' : ''} />+ <RotateCcw size={14} aria-hidden="true" className={actionLoading[app.id] === 'restart' ? 'animate-spin' : ''} /><span className="text-xs">Restart</span></button></>@@ -214,9 +214,8 @@ export default function Apps() {onClick={() => handleStart(app)}disabled={actionLoading[app.id]}className="px-3 py-1.5 bg-port-success/20 text-port-success hover:bg-port-success/30 transition-colors disabled:opacity-50 flex items-center gap-1"- title="Start">- <Play size={14} />+ <Play size={14} aria-hidden="true" /><span className="text-xs">{actionLoading[app.id] === 'start' ? 'Starting...' : 'Start'}</span></button>)}@@ -227,9 +226,9 @@ export default function Apps() {<buttononClick={() => window.open(`${window.location.protocol}//${window.location.hostname}:${app.uiPort}`, '_blank')}className="px-3 py-1.5 bg-port-accent/20 text-port-accent hover:bg-port-accent/30 transition-colors rounded-lg border border-port-border flex items-center gap-1"- title={`Open ${window.location.hostname}:${app.uiPort}`}+ aria-label={`Launch ${app.name} UI`}>- <ExternalLink size={14} />+ <ExternalLink size={14} aria-hidden="true" /><span className="text-xs">Launch</span></button>)}@@ -282,14 +281,14 @@ export default function Apps() {<div><div className="text-xs text-gray-500 uppercase tracking-wide mb-2">Repository Path</div><div className="flex items-start gap-2">- <FolderOpen size={16} className="text-yellow-400 flex-shrink-0 mt-0.5" />+ <FolderOpen size={16} aria-hidden="true" className="text-yellow-400 flex-shrink-0 mt-0.5" /><code className="text-sm text-gray-300 font-mono break-all">{app.repoPath}</code></div></div><div><div className="text-xs text-gray-500 uppercase tracking-wide mb-2">Editor Command</div><div className="flex items-center gap-2">- <Code size={16} className="text-blue-400 flex-shrink-0" />+ <Code size={16} aria-hidden="true" className="text-blue-400 flex-shrink-0" /><code className="text-sm text-gray-300 font-mono">{app.editorCommand || 'code .'}</code></div></div>@@ -302,7 +301,7 @@ export default function Apps() {<div className="bg-port-card border border-port-border rounded-lg p-3">{app.startCommands.map((cmd, i) => (<div key={i} className="flex items-start gap-2 py-1">- <Terminal size={14} className="text-green-400 flex-shrink-0 mt-0.5" />+ <Terminal size={14} aria-hidden="true" className="text-green-400 flex-shrink-0 mt-0.5" /><code className="text-sm text-cyan-300 font-mono break-all">{cmd}</code></div>))}@@ -354,30 +353,30 @@ export default function Apps() {onClick={() => api.openAppInEditor(app.id).catch(() => null)}className="px-3 py-1.5 bg-port-border hover:bg-port-border/80 text-white rounded-lg text-xs flex items-center gap-1">- <Code size={14} /> Open in Editor+ <Code size={14} aria-hidden="true" /> Open in Editor</button><buttononClick={() => api.openAppFolder(app.id).catch(() => null)}className="px-3 py-1.5 bg-port-border hover:bg-port-border/80 text-white rounded-lg text-xs flex items-center gap-1">- <FolderOpen size={14} /> Open Folder+ <FolderOpen size={14} aria-hidden="true" /> Open Folder</button><buttononClick={() => handleRefreshConfig(app)}disabled={refreshingConfig[app.id]}className="px-3 py-1.5 bg-port-border hover:bg-port-border/80 text-white rounded-lg text-xs flex items-center gap-1 disabled:opacity-50"- title="Re-scan ecosystem config for PM2 processes and ports"+ aria-label="Re-scan ecosystem config for PM2 processes and ports">- <RefreshCw size={14} className={refreshingConfig[app.id] ? 'animate-spin' : ''} />+ <RefreshCw size={14} aria-hidden="true" className={refreshingConfig[app.id] ? 'animate-spin' : ''} />Refresh Config</button><buttononClick={() => handleStandardize(app)}disabled={standardizing[app.id]}className="px-3 py-1.5 bg-port-accent/20 text-port-accent hover:bg-port-accent/30 rounded-lg text-xs flex items-center gap-1 disabled:opacity-50"- title="Standardize PM2 config: move all ports to ecosystem.config.cjs"+ aria-label="Standardize PM2 config: move all ports to ecosystem.config.cjs">- <Wrench size={14} className={standardizing[app.id] ? 'animate-spin' : ''} />+ <Wrench size={14} aria-hidden="true" className={standardizing[app.id] ? 'animate-spin' : ''} />{standardizing[app.id] ? 'Standardizing...' : 'Standardize PM2'}</button></div>@@ -444,9 +443,14 @@ function EditAppModal({ app, onClose, onSave }) {};return (- <div className="fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4">+ <div+ className="fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4"+ role="dialog"+ aria-modal="true"+ aria-labelledby="edit-app-title"+ ><div className="bg-port-card border border-port-border rounded-xl p-4 sm:p-6 w-full max-w-lg max-h-[90vh] overflow-auto">- <h2 className="text-xl font-bold text-white mb-4">Edit App</h2>+ <h2 id="edit-app-title" className="text-xl font-bold text-white mb-4">Edit App</h2>{error && (<div className="mb-4 p-3 bg-port-error/20 border border-port-error rounded-lg text-port-error text-sm">