Implement a keyboard shortcuts help feature that displays all available keyboard shortcuts in the CV web application. This feature will help users discover and use keyboard shortcuts efficiently, improving the overall user experience and accessibility.
This is a CV (resume) web application built with:
- Backend: Go with Hono-like routing patterns
- Frontend: HTMX + Hyperscript for interactivity
- Styling: Modern CSS with native HTML5 elements
- Philosophy: Minimal JavaScript, progressive enhancement, native browser APIs
The app already has:
- An info modal using native `
Use the architecture agent to thoroughly analyze the codebase and identify ALL keyboard shortcuts and user actions:
1. **Examine documentation** to understand application features and architecture
2. **Review all Go endpoints** to identify available actions (toggles, language switching, etc.)
3. **Search for keyboard event handlers** in hyperscript and JavaScript files
4. **Identify interactive elements** (buttons, toggles, forms) and their functions
5. **Analyze HTMX attributes** (hx-post, hx-get) to understand available actions
Create a comprehensive list of:
- Existing keyboard shortcuts (Ctrl+P for print, Ctrl+0 for zoom reset, etc.)
- Actions that could benefit from keyboard shortcuts
- Standard browser shortcuts that work in the app (Ctrl+F for find, etc.)
1. **Icon Button**: Create a keyboard shortcuts help button
- Position: Near the existing info icon in the fixed action buttons area
- Icon: Keyboard icon (use iconify-icon like other buttons)
- Behavior: Opens keyboard shortcuts modal on click
- Styling: Consistent with existing action buttons
2. **Modal Dialog**: Create a keyboard shortcuts help modal
- Use native `
Follow the existing architectural patterns in the codebase:
1. **Modal Pattern**:
- Use native `
Based on your research, include shortcuts such as (but not limited to):
**Zoom Controls:**
- Ctrl/Cmd + Plus: Zoom in
- Ctrl/Cmd + Minus: Zoom out
- Ctrl/Cmd + 0: Reset zoom to 100%
**Actions:**
- Ctrl/Cmd + P: Print friendly version
**Browser Shortcuts (mention these too):**
- Ctrl/Cmd + F: Find in page
- Ctrl/Cmd + R: Refresh page
Add any other shortcuts discovered during research.
Organize them in a clean table or list format with:
- Shortcut keys (visual representation)
- Description of action
- Bilingual labels (ES/EN)
Before declaring complete, verify:
1. **Research Complete**:
- Run searches to confirm all keyboard shortcuts are identified
- Check that all major user actions are covered
2. **Functionality**:
- Button appears in correct position near info icon
- Clicking button opens modal
- ESC key closes modal
- Backdrop click closes modal
- Close button works
3. **Visual Integration**:
- Button styling matches other action buttons
- Modal styling matches info modal
- Layout is clean and readable
4. **Bilingual**:
- All text has Spanish and English versions
- Language switching works correctly
5. **Accessibility**:
- ARIA labels present
- Keyboard navigation works
- Focus management is correct
- Keyboard shortcuts help button visible and clickable near info icon
- Modal displays comprehensive list of all keyboard shortcuts
- Modal follows native `` pattern (like info modal)
- All shortcuts organized logically with clear descriptions
- Bilingual support (ES/EN) working correctly
- Zero JavaScript required for basic functionality (native dialog features only)
- Code follows project philosophy and existing patterns