WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: JAWS 14 issues with partial view reloads for SinglePage Java web applications

for

From: Jonathan Avila
Date: Jul 21, 2015 3:34PM


> It's a very interesting problem. Essentially the team is trying to move the focus manually using js. However, there is dynamic server side content that is being added asynchronously which is stealing the jaws virtual cursor from the .focus() code when the dynamic content loads.

Dynamic code cannot steal the virtual cursor to my knowledge unless it also had focused content within it. My guess is that JAWS just isn't seeing the focus change or the new content. As others have said this is likely a timing issue. If you are afraid of using a hard number with setTimeout it may be more useful to actually check for the presence of the page settling down before calling .focus() -- so a setTimeout might act as a callback and simply check over and over until certain elements or attributes are present or set and then after that criteria is set actually call the .focus() method. So basically the code is waiting for a trigger by setting a timer that runs until the trigger occurs.

Jonathan

--
Jonathan Avila
Chief Accessibility Officer
SSB BART Group
<EMAIL REMOVED>

703-637-8957 (o)
Follow us: Facebook | Twitter | LinkedIn | Blog | Newsletter


-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Mary Elizabeth Sullivan
Sent: Tuesday, July 21, 2015 10:19 AM
To: WebAIM Discussion List
Subject: Re: [WebAIM] JAWS 14 issues with partial view reloads for Single Page Java web applications

It's a very interesting problem. Essentially the team is trying to move the focus manually using js. However, there is dynamic server side content that is being added asynchronously which is stealing the jaws virtual cursor from the .focus() code when the dynamic content loads.

You can see visually that the dotted line and focus should be on one element. But it moves to the dynamic content instead.

I'm thinking that it is a page lifecycle issue?

That they are using document.ready() which is too early to be calling that js function.
I'm pretty sure a .live function might do the trick instead maybe. I'm not a js guru but that might be something.

I wish I could call the js when the last piece of dynamic content is loaded server side, but I know that can be brutal to implement Sometimes with frameworks like Java.

Any other thoughts?
Thanks Paul for getting back to me.

-Beth

Sent from my iPhone

> On Jul 20, 2015, at 15:53, Paul J. Adam < <EMAIL REMOVED> > wrote:
>
> Yes I've seen many problems with Single Page Apps. Focus management is the biggest problem. Speaking dynamic content and unique page titles is another major problem. You have to do this all manually with JavaScript.
>
> Paul J. Adam
> Accessibility Evangelist
> www.deque.com
>
> Join us at our Mobile Accessibility "Bootcamp!"
> August 6-7 in Austin Texas
> https://dequeuniversity.com/events/2015/mobile
> Topics include responsive web design, native apps, & more
>
>> On Jul 20, 2015, at 2:14 PM, MEJ - Beth Sullivan < <EMAIL REMOVED> > wrote:
>>
>> Hello,
>>
>> Has anyone seen an issue with single page java applications that are
>> using partial view using ajax to refresh the inside of the page
>> dynamically and JAWS 14. They are also injecting a # at the end of
>> the url to make sure it can be saved as a page/bookmarked.
>>
>> Any thoughts would be great.
>>
>> Thank you,
>>
>> Beth
>> >> >> archives at http://webaim.org/discussion/archives
>> >
> > > archives at http://webaim.org/discussion/archives
>