Closed favna closed 1 year ago
Thanks for reporting this, can you submit a PR or show an example of change here?
I'll see what I can do. I'll have to dive in more to analyse the exact use case and this particular aria attribute. It will probably be somewhere over the weekend.
Looking at the HTML as rendered on https://webhooks.sapphirejs.dev the current attribute is added to the outer container, but that's not how aria-live
should be used according to the description on MDN: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions. Specifically:
ARIA live regions fill this gap and provide a way to programmatically expose dynamic content changes in a way that can be announced by assistive technologies
So keeping it on the outer container that's always visible breaks the use of aria-live. Instead, it should be on the toast itself, which actually has to draw the user's attention.
PR incoming
This line causes an error during a Lighthouse analysis: https://github.com/fumeapp/tailvue/blob/567266536a0e7e4771637c1d6c1a68f8cfeb011a/src/toast.ts#L21
Not sure what purpose it serves, but if it's some form of reference maybe consider changing it to
data-live
?