What is the correct way to resolve this error on a toast (popup notification)? eg name? aria-labelledby? Is the to describe what is in the notification or what the component is?
I'm using https://bootstrap-vue.org/docs/components/toast
This renders something like this
<div role="alert" aria-live="assertive" aria-atomic="true">
<div tabindex="0">
<button type="button" aria-label="Close">×</button>
<div>
<p>Some notification text</p>
</div>
</div>
</div>
Here are the two ways to resolve it:
aria-labelledby
in the parent elementNode e.g<div aria-labelledby="title" role="alert" aria-live="assertive" aria-atomic="true">
<h3 id="title">I am the title</h3>
...
</div>
aria-label
attribute on the parent nodeElement e,g:<div aria-label="Your subscription is about to expire" role="alert" aria-live="assertive" aria-atomic="true">
...
</div>
In summary, what this does is; it tells the screen-reader what the pop-up is about as a kind of summary just the way we get a quick grasp of what an input field is all about when a label is added.