Timeout


Inform users before their session is about to timeout.

Warning This is currently experimental because more research is needed to validate it.

Having a timeout warning helps services meet WCAG 2.0 success criterion 2.2.1 - that services warn users before a timeout occurs and allow them to extend it.

Services should not limit the number of times users can extend their session.

Timeout warning example

Contents

<div class="rosgovuk-modal" tabindex="-1" role="dialog" aria-describedby="body-id" aria-labelledby="heading-id" aria-modal="true">
  <h1 id="heading-id" class="govuk-heading-l">Your application will time out soon</h1>
  <div id="body-id">
    <p class="govuk-body"> We will reset your application if you do not respond in 5 minutes. We do this to keep your information secure.</p>
    <button type="button" className="govuk-button">Continue</button>
  </div>
  <button id="modal-close-button" class="rosgovuk-modal__close-button" aria-label="Close.">
    X
  </button>
</div>

Implementation details

  • The minutes remaining in the ROSA session will be stored in a domain-level cookie uk.gov.ros.session-remaining. This will ensure that the warning shows across multi-tab browsers.
  • Any interactions which cause the ROSA session (page loads, keep-alive called) to be extended will reset the minutes remaining value in the cookie.
  • The modal warning should show a count down of the time remaining.
  • The modal warning should show when there are 5 minutes or fewer remaining in the session.
  • On click of the 'Continue' button, the window will close, the ROSA session will be extended, the minutes remaining in the cookie updated and focus will return to the last focused element.
  • Other sessions (the wrapper, the service itself) must also be extended.
  • If the button is not pressed in the remaining time, the page will be redirected to the login screen with a message informing users of the session timeout.

Research on this pattern

User research conducted on this pattern revealed that users understood the timeout warning, that it was a security feature and the use of the continue button as a way to extend their session.

All participants expected to be logged out if they didn't click continue in time, were happy to log in again and that their data would be cleared.

Research was carried out internally. The pattern is based on a proposed GDS design-system backlog item.

Services using this pattern

  • None.

There is a problem