Skip to content

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

fix: improve accessibility across PortOS UI

Adam Eivyf0e6f51fb26c
diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsx
index 59ff7b6907..69f763b213 100644
--- a/client/src/components/Layout.jsx
+++ b/client/src/components/Layout.jsx
@@ -261,6 +261,13 @@ export default function Layout() {
return (
<div className="min-h-screen bg-port-bg flex">
+ {/* Skip to main content link for keyboard users */}
+ <a
+ href="#main-content"
+ className="sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:bg-port-accent focus:text-white focus:rounded-lg focus:outline-none"
+ >
+ Skip to main content
+ </a>
{/* Mobile overlay */}
{mobileOpen && (
<div
@@ -376,7 +383,7 @@ export default function Layout() {
</header>
{/* Main content */}
- <main className={`flex-1 overflow-auto ${location.pathname.startsWith('/cos') ? '' : 'p-4 md:p-6'}`}>
+ <main id="main-content" className={`flex-1 overflow-auto ${location.pathname.startsWith('/cos') ? '' : 'p-4 md:p-6'}`}>
{location.pathname.startsWith('/cos') ? (
<Outlet />
) : (
diff --git a/client/src/components/NotificationDropdown.jsx b/client/src/components/NotificationDropdown.jsx
index 0ad0f1e883..33cf8580e9 100644
--- a/client/src/components/NotificationDropdown.jsx
+++ b/client/src/components/NotificationDropdown.jsx
@@ -83,12 +83,15 @@ export default function NotificationDropdown({
{/* Bell button with badge */}
<button
onClick={() => setIsOpen(!isOpen)}
- className="relative p-2 rounded-lg hover:bg-port-card transition-colors"
+ className="relative p-2 rounded-lg hover:bg-port-card transition-colors focus:outline-none focus:ring-2 focus:ring-port-accent focus:ring-offset-2 focus:ring-offset-port-bg"
title="Notifications"
+ aria-label={`Notifications${unreadCount > 0 ? ` (${unreadCount} unread)` : ''}`}
+ aria-expanded={isOpen}
+ aria-haspopup="true"
>
- <Bell className={`w-5 h-5 ${unreadCount > 0 ? 'text-yellow-400' : 'text-gray-400'}`} />
+ <Bell className={`w-5 h-5 ${unreadCount > 0 ? 'text-yellow-400' : 'text-gray-400'}`} aria-hidden="true" />
{unreadCount > 0 && (
- <span className="absolute -top-1 -right-1 min-w-[18px] h-[18px] flex items-center justify-center text-[10px] font-bold rounded-full bg-yellow-500 text-black px-1">
+ <span className="absolute -top-1 -right-1 min-w-[18px] h-[18px] flex items-center justify-center text-[10px] font-bold rounded-full bg-yellow-500 text-black px-1" aria-hidden="true">
{unreadCount > 9 ? '9+' : unreadCount}
</span>
)}
@@ -96,11 +99,15 @@ export default function NotificationDropdown({
{/* Dropdown panel - position determines direction */}
{isOpen && (
- <div className={`absolute w-80 bg-port-card border border-port-border rounded-lg shadow-xl z-50 overflow-hidden ${
- position === 'bottom'
- ? 'left-0 bottom-full mb-2' // Opens upward from sidebar footer
- : 'right-0 top-full mt-2' // Opens downward from header
- }`}>
+ <div
+ role="menu"
+ aria-label="Notifications menu"
+ className={`absolute w-80 bg-port-card border border-port-border rounded-lg shadow-xl z-50 overflow-hidden ${
+ position === 'bottom'
+ ? 'left-0 bottom-full mb-2' // Opens upward from sidebar footer
+ : 'right-0 top-full mt-2' // Opens downward from header
+ }`}
+ >
{/* Header */}
<div className="flex items-center justify-between px-4 py-3 border-b border-port-border">
<span className="font-medium text-white">Notifications</span>
@@ -108,19 +115,21 @@ export default function NotificationDropdown({
{unreadCount > 0 && (
<button
onClick={onMarkAllAsRead}
- className="p-1.5 rounded hover:bg-port-border transition-colors"
+ className="p-1.5 rounded hover:bg-port-border transition-colors focus:outline-none focus:ring-2 focus:ring-port-accent"
title="Mark all as read"
+ aria-label="Mark all notifications as read"
>
- <CheckCheck className="w-4 h-4 text-gray-400" />
+ <CheckCheck className="w-4 h-4 text-gray-400" aria-hidden="true" />
</button>
)}
{notifications.length > 0 && (
<button
onClick={onClearAll}
- className="p-1.5 rounded hover:bg-port-border transition-colors"
+ className="p-1.5 rounded hover:bg-port-border transition-colors focus:outline-none focus:ring-2 focus:ring-port-accent"
title="Clear all"
+ aria-label="Clear all notifications"
>
- <Trash2 className="w-4 h-4 text-gray-400" />
+ <Trash2 className="w-4 h-4 text-gray-400" aria-hidden="true" />
</button>
)}
</div>
@@ -140,16 +149,19 @@ export default function NotificationDropdown({
return (
<div
key={notification.id}
+ role="menuitem"
+ tabIndex={0}
className={`
px-4 py-3 border-b border-port-border last:border-b-0 cursor-pointer
- hover:bg-port-border/50 transition-colors
+ hover:bg-port-border/50 transition-colors focus:outline-none focus:bg-port-border/50
${!notification.read ? 'bg-port-border/30' : ''}
border-l-2 ${PRIORITY_COLORS[notification.priority] || PRIORITY_COLORS.medium}
`}
onClick={() => handleNotificationClick(notification)}
+ onKeyDown={(e) => e.key === 'Enter' && handleNotificationClick(notification)}
>
<div className="flex items-start gap-3">
- <div className={`p-1.5 rounded ${config.bgColor}`}>
+ <div className={`p-1.5 rounded ${config.bgColor}`} aria-hidden="true">
<Icon className={`w-4 h-4 ${config.color}`} />
</div>
<div className="flex-1 min-w-0">
@@ -162,9 +174,10 @@ export default function NotificationDropdown({
e.stopPropagation();
onRemove(notification.id);
}}
- className="p-1 rounded hover:bg-port-border transition-colors opacity-0 group-hover:opacity-100"
+ className="p-1 rounded hover:bg-port-border transition-colors opacity-0 group-hover:opacity-100 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-port-accent"
+ aria-label={`Remove notification: ${notification.title}`}
>
- <X className="w-3 h-3 text-gray-500" />
+ <X className="w-3 h-3 text-gray-500" aria-hidden="true" />
</button>
</div>
{notification.description && (
diff --git a/client/src/index.css b/client/src/index.css
index 1cc0a20d41..312ac4b9a6 100644
--- a/client/src/index.css
+++ b/client/src/index.css
@@ -8,6 +8,45 @@ body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
+/* Accessibility: Global focus styles for keyboard navigation */
+*:focus-visible {
+ outline: 2px solid #3b82f6;
+ outline-offset: 2px;
+}
+
+/* Accessibility: Remove focus outline for mouse users while keeping it for keyboard */
+*:focus:not(:focus-visible) {
+ outline: none;
+}
+
+/* Accessibility: High contrast focus for important interactive elements */
+button:focus-visible,
+a:focus-visible,
+[role="button"]:focus-visible,
+[tabindex="0"]:focus-visible {
+ outline: 2px solid #3b82f6;
+ outline-offset: 2px;
+ box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
+}
+
+/* Accessibility: Ensure disabled elements are perceivable but not interactive */
+[disabled],
+[aria-disabled="true"] {
+ cursor: not-allowed;
+ opacity: 0.5;
+}
+
+/* Accessibility: Reduce motion for users who prefer it */
+@media (prefers-reduced-motion: reduce) {
+ *,
+ *::before,
+ *::after {
+ animation-duration: 0.01ms !important;
+ animation-iteration-count: 1 !important;
+ transition-duration: 0.01ms !important;
+ }
+}
+
/* Scrollbar styling */
::-webkit-scrollbar {
width: 8px;
diff --git a/client/src/pages/Apps.jsx b/client/src/pages/Apps.jsx
index 955b7751d4..f1cf0625e4 100644
--- a/client/src/pages/Apps.jsx
+++ b/client/src/pages/Apps.jsx
@@ -195,7 +195,9 @@ export default function Apps() {
<button
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"
+ 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 focus:outline-none focus:ring-2 focus:ring-port-error"
+ aria-label={`Stop ${app.name}`}
+ aria-busy={actionLoading[app.id] === 'stop'}
>
<Square size={14} aria-hidden="true" />
<span className="text-xs">Stop</span>
@@ -203,7 +205,9 @@ export default function Apps() {
<button
onClick={() => 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"
+ 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 focus:outline-none focus:ring-2 focus:ring-port-warning"
+ aria-label={`Restart ${app.name}`}
+ aria-busy={actionLoading[app.id] === 'restart'}
>
<RotateCcw size={14} aria-hidden="true" className={actionLoading[app.id] === 'restart' ? 'animate-spin' : ''} />
<span className="text-xs">Restart</span>
@@ -213,7 +217,9 @@ export default function Apps() {
<button
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"
+ 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 focus:outline-none focus:ring-2 focus:ring-port-success"
+ aria-label={`Start ${app.name}`}
+ aria-busy={actionLoading[app.id] === 'start'}
>
<Play size={14} aria-hidden="true" />
<span className="text-xs">{actionLoading[app.id] === 'start' ? 'Starting...' : 'Start'}</span>
@@ -235,18 +241,20 @@ export default function Apps() {
{/* Edit/Delete Actions */}
{confirmingDelete === app.id ? (
- <div className="flex items-center gap-2">
+ <div className="flex items-center gap-2" role="alertdialog" aria-label={`Confirm deletion of ${app.name}`}>
<span className="text-xs text-gray-400">Remove?</span>
<div className="inline-flex rounded-lg overflow-hidden border border-port-border">
<button
onClick={() => handleDelete(app)}
- className="px-2 py-1 bg-port-error/20 text-port-error hover:bg-port-error/30 text-xs"
+ className="px-2 py-1 bg-port-error/20 text-port-error hover:bg-port-error/30 text-xs focus:outline-none focus:ring-2 focus:ring-port-error"
+ aria-label={`Confirm delete ${app.name}`}
>
Yes
</button>
<button
onClick={() => setConfirmingDelete(null)}
- className="px-2 py-1 bg-port-border/50 text-gray-400 hover:text-white text-xs border-l border-port-border"
+ className="px-2 py-1 bg-port-border/50 text-gray-400 hover:text-white text-xs border-l border-port-border focus:outline-none focus:ring-2 focus:ring-port-accent"
+ aria-label="Cancel deletion"
>
No
</button>
@@ -256,13 +264,15 @@ export default function Apps() {
<div className="inline-flex rounded-lg overflow-hidden border border-port-border">
<button
onClick={() => setEditingApp(app)}
- className="px-3 py-1.5 bg-port-accent/20 text-port-accent hover:bg-port-accent/30 transition-colors text-xs"
+ className="px-3 py-1.5 bg-port-accent/20 text-port-accent hover:bg-port-accent/30 transition-colors text-xs focus:outline-none focus:ring-2 focus:ring-port-accent"
+ aria-label={`Edit ${app.name}`}
>
Edit
</button>
<button
onClick={() => setConfirmingDelete(app.id)}
- className="px-3 py-1.5 bg-port-error/10 text-port-error hover:bg-port-error/20 transition-colors text-xs border-l border-port-border"
+ className="px-3 py-1.5 bg-port-error/10 text-port-error hover:bg-port-error/20 transition-colors text-xs border-l border-port-border focus:outline-none focus:ring-2 focus:ring-port-error"
+ aria-label={`Delete ${app.name}`}
>
Delete
</button>
diff --git a/client/src/pages/DevTools.jsx b/client/src/pages/DevTools.jsx
index a46418c42f..06f9a97790 100644
--- a/client/src/pages/DevTools.jsx
+++ b/client/src/pages/DevTools.jsx
@@ -101,7 +101,8 @@ export function HistoryPage() {
<select
value={filter.action}
onChange={(e) => setFilter(prev => ({ ...prev, action: e.target.value }))}
- className="px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white"
+ className="px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-port-accent"
+ aria-label="Filter by action type"
>
<option value="">All Actions</option>
{actions.map(action => (
@@ -112,7 +113,8 @@ export function HistoryPage() {
<select
value={filter.success}
onChange={(e) => setFilter(prev => ({ ...prev, success: e.target.value }))}
- className="px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white"
+ className="px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-port-accent"
+ aria-label="Filter by result status"
>
<option value="">All Results</option>
<option value="true">Success</option>
@@ -162,8 +164,12 @@ export function HistoryPage() {
>
<div className="flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-4">
<div className="flex items-center gap-3 flex-1 min-w-0">
- <button className="text-gray-400 hover:text-white flex-shrink-0">
- <span className={`inline-block transition-transform ${expandedId === entry.id ? 'rotate-90' : ''}`}>▶</span>
+ <button
+ className="text-gray-400 hover:text-white flex-shrink-0 focus:outline-none focus:ring-2 focus:ring-port-accent rounded"
+ aria-expanded={expandedId === entry.id}
+ aria-label={`${expandedId === entry.id ? 'Collapse' : 'Expand'} ${entry.action} details`}
+ >
+ <span className={`inline-block transition-transform ${expandedId === entry.id ? 'rotate-90' : ''}`} aria-hidden="true">▶</span>
</button>
<span className="text-xl flex-shrink-0">{getActionIcon(entry.action)}</span>
<div className="flex-1 min-w-0">
@@ -182,14 +188,19 @@ export function HistoryPage() {
</div>
</div>
<div className="flex items-center gap-3 pl-8 sm:pl-0">
- <span className={`w-2 h-2 rounded-full flex-shrink-0 ${entry.success ? 'bg-port-success' : 'bg-port-error'}`} />
+ <span
+ className={`w-2 h-2 rounded-full flex-shrink-0 ${entry.success ? 'bg-port-success' : 'bg-port-error'}`}
+ role="img"
+ aria-label={entry.success ? 'Success' : 'Failed'}
+ />
<span className="text-sm text-gray-500 flex-shrink-0">{formatTime(entry.timestamp)}</span>
<button
onClick={(e) => handleDelete(entry.id, e)}
- className="p-1 text-gray-500 hover:text-port-error transition-colors sm:opacity-0 sm:group-hover:opacity-100"
+ className="p-1 text-gray-500 hover:text-port-error transition-colors sm:opacity-0 sm:group-hover:opacity-100 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-port-accent rounded"
title="Delete entry"
+ aria-label={`Delete ${entry.action} entry from ${formatTime(entry.timestamp)}`}
>
- <Trash2 size={14} />
+ <Trash2 size={14} aria-hidden="true" />
</button>
</div>
</div>