sharu725 / youtube-embed

Embeds a clickable youtube thumbnail instead of the iframe. Upon clicking, loads the iframe.
https://embed.sveltethemes.dev
36 stars 7 forks source link

Seeing Ally error #30

Closed willgottschalk closed 1 week ago

willgottschalk commented 2 weeks ago

I'm seeing the following warning when building my code

[vite-plugin-svelte]: /node_modules/svelte-youtube-embed/Youtube.svelte:44:4 A11y: <div> with click, keypress handlers must have an ARIA role
42:       <Image {id} {title} {altThumb} {play} />
43:     {/if}
44:     <div class="b__overlay" on:click={() => (play = true)} on:keypress={() => (play = true)} />
        ^
45:     <div class="v__title"><h3>{title}</h3></div>
46:   {/if}

I'd be happy to add aria-labels to satisfy the warnings

sharu725 commented 2 weeks ago

Please do. Thank you.