An affordable way to notify a user about a session end

I have a website that authenticates the user for a given period of time and at any subsequent page request, so that the time interval is extended. I am wondering how to notify users that time is running out without using js.alert (), but also remains available.

I saw some sites where the content will slide on top and not invade the user, but is still noticeable. The problem I see in this is that it cannot update the screen reader, and users with accessibility features will not know about it.

Suggestions?

+4
source share
2 answers

The correct way to notify a user of access should be in accordance with WAI-ARIA (an affordable, rich Internet application). Now documents are only a technical part of your implementation - as with all Internet technologies, its implementation among screen readers and other accessibility tools varies widely and is difficult to install without extensive testing, but itโ€™s certainly best to work with this moment.

Specifications require that this type of message be marked role='alert' and their dialog boxes with the role='alertdialog' attribute. It indicates that warnings

Communication with important and usually time sensitive information.

which would certainly fit the bill. Now Iโ€™m not sure about your concern with the screen buffer problem, but as far as I read this topic, readers on the screen who use the WAI-ARIA specifications should constantly scan the page for new attributes and elements, as tutorials like this , you can even add the alert attribute to the elements already present on the page, so I do not believe that your problem should be a problem for modern screen readers.

+5
source

You can use some nice JS / jquery countdown and show it to the user somewhere on the page. In the end, either display a good looking dialog warning that the session will expire, or quietly refresh the session using AJAX until the page is open.

I saw a timer counting down from 10 minutes on the bank account page. It is quite simple and gives me good information on how much time I need to fill before my session is closed.

+1
source

All Articles