Skip to content

feat(ui): implement keyboard navigation for episode selection#55

Open
rogueburger21 wants to merge 1 commit into
truelockmc:mainfrom
rogueburger21:feature/keyboard-nav
Open

feat(ui): implement keyboard navigation for episode selection#55
rogueburger21 wants to merge 1 commit into
truelockmc:mainfrom
rogueburger21:feature/keyboard-nav

Conversation

@rogueburger21
Copy link
Copy Markdown
Contributor

@rogueburger21 rogueburger21 commented May 16, 2026

Addresses #16

Description

This PR introduces keyboard navigation to the episode selection list on TVPage. This greatly improves accessibility and ease of use, allowing users to rapidly navigate through seasons without needing a mouse.

Changes

  • State Management: Added focusedEpisodeIndex state to TVPage to track the currently focused episode card.
  • Event Listeners: Implemented a keydown listener to handle ArrowUp, ArrowDown, ArrowLeft, ArrowRight, and Enter keys.
  • Visuals: Added visual focus indicators (.episode-card.focused) to the episode cards in global.css to match the hover styling.
  • Interaction: Ensured that pressing Enter on a focused episode triggers playback, provided the episode is released and unrestricted.

- Added focusedEpisodeIndex state to TVPage to track the currently focused episode card.
- Implemented a keydown event listener to handle ArrowUp, ArrowDown, ArrowLeft, ArrowRight, and Enter keys.
- Added visual focus indicators (.episode-card.focused) to the episode cards in global.css.
- Ensured that pressing Enter on a focused episode triggers the playEpisode function if the episode is released and unrestricted.
@rogueburger21 rogueburger21 mentioned this pull request May 16, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant