WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: preferred method for alerting user that results are displayed after search

for

From: Birkir R. Gunnarsson
Date: Jul 26, 2017 8:47PM


aria-alert is not a valid attribute.
What you are looking for is aria-live="assertive".
I would simply impliment a visually hidden live region that is
populated when results are visible.
<div aria-live="assertive" id=sr" class="sr-only"> </div>
(the class name is whatever you have for visually hidden content).
When the JavaScript is done updating page with search results it
should add an alert to this region.

document.getElementById("sr").textContent="Search results are available".
You could also move focus to the top of the search results (if the
search is initiated by clicking a button).


On 7/26/17, Angela French < <EMAIL REMOVED> > wrote:
> Hello,
> We have a web form that creates a query to a database. After the screen
> reader user (I'm using NVDA to test) clicks "search" the results show on the
> page, but NVDA doesn't announce them. The same goes on our login form if
> the user doesn't enter a valid username. We have tried using
> aria-alert="assertive" but it is not announced. In a Google search I'm
> reading from a few years ago that screen reader support for these live
> regions is spotty. Is that still true? What is a fool proof method for
> alerting users that the results are now displayed on the page? If the
> results have a link in them, then tabbing seems to work, but not so on our
> user error message.
>
> Thank you
>
>
>
> Angela French
> Internet/Intranet Specialist
> Washington State Board for Community and Technical Colleges
> 360-704-4316
> <EMAIL REMOVED> <mailto: <EMAIL REMOVED> >
> www.sbctc.edu<;http://www.sbctc.edu/>;
>
> > > > >


--
Work hard. Have fun. Make history.