Skip to content

[EPIC][A11Y]: Keyboard navigation and shortcuts #2275

@crivetimihai

Description

@crivetimihai

⌨️ 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?

  1. Power User Productivity: Keyboard shortcuts significantly speed up repetitive tasks
  2. Accessibility Requirement: Keyboard navigation is essential for users who cannot use a mouse
  3. Developer Expectation: Developers expect keyboard shortcuts in admin tools (like IDE patterns)
  4. 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:

  • ? or Ctrl+/ - Show keyboard shortcuts help
  • Ctrl+K or / - Open command palette/search
  • g s - Go to Servers tab
  • g t - Go to Tools tab
  • g r - Go to Resources tab
  • g p - Go to Prompts tab
  • g g - Go to Gateways tab
  • g a - Go to Agents tab
  • g m - Go to Metrics tab
  • Escape - 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:

  • j or - Move to next row
  • k or - Move to previous row
  • Enter or o - Open/view selected item
  • e - Edit selected item
  • d - 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 saving
  • Ctrl+Enter - Submit form / Save changes
  • Tab / 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 + key navigation 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/k or arrow navigation
  • Add Enter to open, e to edit, d to delete
  • Implement multi-select with Space and Ctrl+A
  • Visual indicator for selected row

Phase 4: Modal & Form Shortcuts

  • Implement Escape to close modals
  • Add Ctrl+Enter to 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

📚 References

Metadata

Metadata

Assignees

Labels

COULDP3: Nice-to-have features with minimal impact if left out; included if time permitsenhancementNew feature or requestepicLarge feature spanning multiple issuesfrontendFrontend development (HTML, CSS, JavaScript)uiUser Interface

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions