Work in progress
This page is a design preview. It may not contain the latest guidance and may not behave as expected.
Current guidance can always be found at design-system.dwp.gov.uk.
Warn users about session timeouts and let them extend the session
Use this pattern to let users extend their session when it is about to end and explain what has happened after a session has timed out.
This pattern helps services meet the Extend condition of WCAG 2.2 success criterion 2.2.1, 'Timing Adjustable'. This says that to meet level AA a service must warn users before a session timeout occurs and allow them to extend the time limit.
A service with sessions will normally end a session automatically after a certain amount of time if the user takes no action. If your service has an automatic timeout you should use this pattern to warn users and allow them to extend the session if they want to.
You should warn a user at least 2 minutes before the end of this time. This will give them time to decide if they want to keep using the service.
The pattern aims to provide a consistent way for DWP services to warn users about timeouts and allow them to extend their session. This is required for services to meet accessibility standards.
This pattern uses the HMRC frontend timeout component, which has been implemented in a number of DWP services including:
An alternative modal dialog can be found on the GOV.UK Design System community backlog.
There is a public discussion for this topic on GitHub where you can share anything you think might be useful. Discuss Manage a session timeout on GitHub.
Need help implementing this in a prototype or production build? Get support from the Design System team.
We depend on insights from real projects to update and improve the design system. If you use something we made, tell us how it went.
Send questions, comments or suggestions to the DWP Design System team.
Last updated: