kbrgl / svelte-french-toast

🍞🥂 Buttery smooth toast notifications for Svelte
https://svelte-french-toast.vercel.app/
MIT License
809 stars 28 forks source link

A11y ARIA Role Warning #44

Closed n00ki closed 1 year ago

n00ki commented 1 year ago

Hi :)

Lately, I noticed an a11y warning in my tests regarding svelte-french-toast: A11y: <div> with mouseenter, mouseleave handlers must have an ARIA role. This warning comes from the <div> element in Toaster.svelte. Maybe we should consider adding an alert aria role?

<div role="alert"
    class="toaster {containerClassName || ''}"
    style={containerStyle}
    on:mouseenter={handlers.startPause}
    on:mouseleave={handlers.endPause}
>
    {#each _toasts as toast (toast.id)}
    <ToastWrapper {toast} setHeight={(height) => handlers.updateHeight(toast.id, height)} />
    {/each}
</div>

Thanks in advance🙏

kbrgl commented 1 year ago

Fixed on master, tracked in #38. Haven't published to NPM yet.