vtex / shoreline

Design System for the VTEX Admin that replaces "Admin UI" and "Styleguide"
https://shoreline.vtex.com
15 stars 0 forks source link

ToastStack: `ariaProps` are not passed down #1536

Open rafarubim opened 3 months ago

rafarubim commented 3 months ago

Bug Report

What happened

When using <ToastStack> component, the toastOptions.ariaProps option is not passed down to the HTML as the example in react-hot-toast docs.

What I expected to happen

I'm using ariaProps to add the role: 'status' property to the Toast HTML, but it doesn't work. I also suggest adding a default role when the user doesn't use ariaProps, to improve accessibility.

<ToastStack
  toastOptions={{
    ariaProps: {
      role: 'status',
      'aria-live': 'polite',
    },
  }}
/>

Reproducing

matheusps commented 3 months ago

Yes! You are correct, this is a bug.

matheusps commented 3 months ago

@rafarubim , I'm putting this as a good-first-issue. If you want to pick it up, you can.