diff --git a/src/routes/[type=mediaType]/[id]/[season]/+page.svelte b/src/routes/[type=mediaType]/[id]/[season]/+page.svelte index 296bc3c..621c937 100644 --- a/src/routes/[type=mediaType]/[id]/[season]/+page.svelte +++ b/src/routes/[type=mediaType]/[id]/[season]/+page.svelte @@ -1,11 +1,81 @@ @@ -75,14 +145,29 @@
{#each data.details.episodes as episode} -
+
handleEpisodeClick(episode.episode_number)} + on:keydown={(e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + handleEpisodeClick(episode.episode_number); + } + }} + aria-label="Episode {episode.episode_number}{episode.name ? `: ${episode.name}` : ''}" + aria-pressed={selectedEpisodeNumber === episode.episode_number} + aria-expanded={selectedEpisodeNumber === episode.episode_number} + >
{episode.id}
@@ -91,6 +176,31 @@ > Episode {episode.episode_number}
+ + + {#if selectedEpisodeNumber === episode.episode_number && data.mediaItemDetails.find((x) => x.number == episode.episode_number)} +
+ + +
+ {/if} +
{#if data.mediaItemDetails.find((x) => x.number == episode.episode_number)}