WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: forms and multiple aria-live regions

for

From: Birkir R. Gunnarsson
Date: May 25, 2018 9:17AM


Make sure to place aria-live on the parent of the element that gets
displayed, not on the eleent itself.
bad:
<div aria-live="polite" style="display: none;">There were errors</div>
Good
<div aria-live="polite">
<div style="display: none;">there were errors</div>
</div>

Screenreaders are instructed to announce live region content when it
is added or changed.
In the bad case the content isn't changed,only the visibility of the element.
Some screen readers may announce it regardless, but I think your
results will not be reliable.
In the second case, updating the visibility of the child element
effectively adds content to the live region, so it should reliably be
announced.

I'll get to the code pends over the weekend, today is unexpectedly busy.



On 5/25/18, Swift, Daniel P. < <EMAIL REMOVED> > wrote:
> Another excellent point - thanks, Mark!
>
> Dan Swift
> Senior Web Specialist
> Enterprise Services
> West Chester University
> 610.738.0589
>
>