-
Notifications
You must be signed in to change notification settings - Fork 614
[EPIC][A11Y]: Keyboard navigation and shortcuts #2275
Description
⌨️ Epic: Keyboard Navigation & Shortcuts
Goal
Implement comprehensive keyboard shortcuts and navigation for power users, enabling fast, mouse-free interaction with the Admin UI. Include a discoverable help system and customizable bindings.
Why Now?
- Power User Productivity: Keyboard shortcuts significantly speed up repetitive tasks
- Accessibility Requirement: Keyboard navigation is essential for users who cannot use a mouse
- Developer Expectation: Developers expect keyboard shortcuts in admin tools (like IDE patterns)
- Competitive Feature: Modern admin UIs (Vercel, Linear, GitHub) all have keyboard shortcuts
📖 User Stories
US-1: Global Keyboard Shortcuts
As a power user
I want keyboard shortcuts for common actions
So that I can work faster without reaching for the mouse
Acceptance Criteria:
?orCtrl+/- Show keyboard shortcuts helpCtrl+Kor/- Open command palette/searchg s- Go to Servers tabg t- Go to Tools tabg r- Go to Resources tabg p- Go to Prompts tabg g- Go to Gateways tabg a- Go to Agents tabg m- Go to Metrics tabEscape- Close modal/dropdown, clear selection
US-2: Table/List Navigation
As a user navigating entity lists
I want vim-style or arrow key navigation
So that I can browse and select items quickly
Acceptance Criteria:
jor↓- Move to next rowkor↑- Move to previous rowEnteroro- Open/view selected iteme- Edit selected itemd- Delete selected item (with confirmation)Space- Toggle selection (for bulk operations)Ctrl+A- Select all visible items
US-3: Modal & Form Navigation
As a user filling out forms
I want keyboard shortcuts within modals
So that I can submit or cancel without clicking buttons
Acceptance Criteria:
Escape- Close modal without savingCtrl+Enter- Submit form / Save changesTab/Shift+Tab- Navigate form fields- Focus trapped within modal while open
- Focus returns to trigger element on close
US-4: Shortcuts Help Panel
As a new user
I want a discoverable keyboard shortcuts reference
So that I can learn available shortcuts
Acceptance Criteria:
- Help panel accessible via
?key - Grouped by category (Navigation, Actions, Tables)
- Searchable shortcuts list
- Shows current key bindings
- Dismissible with
Escape
US-5: Shortcuts Don't Interfere with Input
As a user typing in form fields
I want shortcuts disabled when typing
So that I don't accidentally trigger actions
Acceptance Criteria:
- Single-key shortcuts disabled when focus in input/textarea
- Modifier shortcuts (Ctrl+K) work everywhere
- CodeMirror editor has its own shortcut context
- No conflicts with browser shortcuts
📋 Implementation Tasks
Phase 1: Infrastructure
- Add keyboard shortcut library (hotkeys-js or tinykeys, both MIT)
- Create shortcut registry with categories
- Implement context-aware shortcuts (disable in inputs)
- Add shortcut help modal component
Phase 2: Global Navigation
- Implement
g + keynavigation shortcuts - Add tab switching shortcuts
- Implement command palette trigger (
Ctrl+K) - Add help panel trigger (
?)
Phase 3: Table Navigation
- Add row selection state management
- Implement
j/kor arrow navigation - Add
Enterto open,eto edit,dto delete - Implement multi-select with
SpaceandCtrl+A - Visual indicator for selected row
Phase 4: Modal & Form Shortcuts
- Implement
Escapeto close modals - Add
Ctrl+Enterto submit forms - Ensure focus trapping in modals
- Return focus on modal close
Phase 5: Documentation & Polish
- Create keyboard shortcuts help content
- Add tooltips showing shortcuts on buttons
- Document shortcuts in user guide
- Add visual hints (e.g., "Press ? for shortcuts")
⚙️ Configuration
// Shortcut registry structure
const shortcuts = {
global: {
'?': { action: 'showHelp', description: 'Show keyboard shortcuts' },
'ctrl+k': { action: 'openCommandPalette', description: 'Open search' },
'escape': { action: 'closeModal', description: 'Close modal/clear' },
},
navigation: {
'g s': { action: 'goToServers', description: 'Go to Servers' },
'g t': { action: 'goToTools', description: 'Go to Tools' },
// ...
},
table: {
'j': { action: 'nextRow', description: 'Next row' },
'k': { action: 'prevRow', description: 'Previous row' },
'enter': { action: 'openItem', description: 'Open selected' },
// ...
}
};✅ Success Criteria
- All primary navigation achievable via keyboard
- Table navigation works with j/k or arrows
- Help panel shows all available shortcuts
- Shortcuts don't interfere with form input
- Shortcuts documented in user guide