views:

63

answers:

2

I have a site which authenticates a user for a given time period and on any subsequent page request that time interval is extended. I am wondering how to notify users their time is about to expire without using a js.alert() but also remain accessible.

I have seen some sites where content will slide in from the top and not intrude the user but still be noticeable. The problem I see with this is that it may not update the screen reader's buffer and the users with accessibility needs will not become aware of this.

Suggestions?

+1  A: 

You can use some nice JS/jquery countdown and show it to user somewhere on page. Eventually display well looking dialog with alert that session is going to expire, or silently refresh session with AJAX as long as page is opened.

I saw a timer counting down from 10 minutes in the bank account page. It's quite simple, and gives me good information about how much time i have to fill a form before my session will be closed.

killer_PL
This doesn't address the issue of accessibility?
Michael Robinson
@killer_PL this does not aid in accessibility
Chris
This does help with accessibility. There's no garantee that a screen reader will support WAI-ARIA so a count down timer with an alert near the end that a screen reader will pick up is your best option.
Jared
+5  A: 

The correct method of alerting a user accessibly should be to conform to the WAI-ARIA (Accessible Rich Internet Application) Specifications. Now the documents are only the technical part of your implementation - as with all Internet technology its implementation among screen readers and other accessibility tools varies widely and is difficult to ascertain without extensive testing, but it is certainly the best we've got to work with as of now.

The specifications calls for this type of messages to be marked with the role='alert', and their dialog boxes with the role='alertdialog' attribute. It states that alerts are

A message with important, and usually time-sensitive, information.

which would certainly fit the bill. Now I'm not sure about your concern about the screen reader buffer problem, but as far as my reading on this subject goes the screen readers that adopt the WAI-ARIA specifications will need to be constantly scanning the page for new attributes and elements, as tutorials like this show, it is even possible to add the alert attribute to elements already present on the page, thus I do not believe that your concern should present a problem to modern screen readers.

Yi Jiang
Thanks for the comments, much appreciated and you certainly pointed me in the right direction.
Chris
@Yi Jiana your link shuold be http://www.w3.org/WAI/intro/aria instead of http://www.w3.org/WAI/ for WAI_ARIA.
Chris
@Chris Thanks, fixed.
Yi Jiang
no problem thanks again!
Chris
What a great answer, really helpful for me as well!
Michael Robinson