Your session expired. What happened to the form?
Plan warnings, re-authentication and return to a form while checking saved data and unfinished operations.
Article language: English

In this article
"Your session has expired. Please sign in again." The message explains why you cannot continue right now. It does not answer the question that usually comes first: what happened to the text you spent the last several minutes writing? Before entering a password, a person tries to work out whether the site has just lost their work.
In a fictional company website, an editor is completing a project description. They open material in another tab, take a call and return to the dashboard. The paragraph is still visible, but saving brings up a sign-in request. The interruption should be designed so the editor can recognise the state of the text and decide what to do next.
Losing access and losing data are different events
Here, a session is the period during which the system recognises a signed-in person. Its expiry does not by itself say whether a draft was saved. That depends on the site's implementation. Establish the distinction before writing the message, not only when accepting a finished dialog.
Determine three things separately: when access ends, which data was persisted, and what happened to an operation already in progress. An earlier paragraph may be saved while the last few sentences remain unconfirmed. The editor may also have sent a save request just before the interruption. Each situation calls for a different message on return.
Do not call everything a "session error". For the user, the important question is whether they need to confirm their identity again, restore part of the text, or check an operation's outcome. A generic message may encourage another button press even though the previous attempt already finished.
The explanation of WCAG success criterion 2.2.5 at level AAA describes continuing an activity without data loss after re-authentication, or confirming identity again. It is a specific reference for designing the return, not an assessment of the site's overall accessibility.
In our example, describe the expected sequence in plain language. The editor signs in again, returns to the same project and recognises the version that was retained. The latest addition remains available for checking. If some material was not saved, the system says so in accordance with what it can actually establish.
Clarify what counts as activity too. Is it typing, moving between views, opening a document or only a server-side operation? A user should not discover afterwards that the system regarded a long period of composing an answer as inactivity. Agree the rule with the owner of the session mechanism and test it in a real flow.
Keeping content must be part of the agreed solution. An interface cannot promise to recover data that was never persisted anywhere. A designer needs to know the confirmed save point and recovery method. Those facts determine an honest message before and after an interruption.
A warning should enable a decision
If the session can be extended, show what will happen soon and what the person can do. "Need more time?" may be understandable, but buttons should name the action: stay in the dashboard or sign out. The user should not have to guess whether closing the dialog also extends access.
The USWDS modal example shows a session-expiry warning with a choice to stay or sign out. It illustrates how to organise a decision. The timing and consequences on your own site must match its actual configuration.
Record the behaviour of every exit route. Clicking a button, pressing Escape, closing the tab and doing nothing can have different effects. If a dialog requires a decision, a person must be able to make it without a mouse. Also check where focus goes when it closes: the editor should return to the interrupted task.
A warning needs enough time to be noticed and acted on. Consider someone who reads more slowly, uses a screen reader or must first find the right button. Do not evaluate the dialog only by its creator clicking quickly through it.
Listen to the order of information: what is happening, what it means and which action continues the work. If a countdown changes, listen for whether it interferes with the message and button labels. The goal is to perform the right action, not to hear every second. Let a screen-reader user go through the warning independently and record when they recognise the needed action. An accessibility review of the business website (in Polish) should include this interrupted state, not just the form before the dialog appears.
In a test, click "stay" just before expiry. Check that the system actually confirmed the extension. The warning disappearing does not itself show the outcome. If the request failed, the message should reflect that state and offer a route to sign-in or the retained work.
Do not leave an old warning visible after a successful state change. A dialog saying access will soon expire when it has just been renewed undermines trust in later messages. A counter that restarts without explanation does the same. The displayed time should relate to the session the person is actually using.
Test after switching tabs and putting the device to sleep. Wait the agreed period, return and compare the message with the ability to perform the task. Do not assume a visible counter proves access is still valid. In our example, the editor may see an old screen despite already needing to sign in again. Before accepting another decision, the interface should recognise the current state rather than letting the person continue writing under an outdated warning.
Also try doing nothing. The editor may be on a call and not see the warning. Extending the session cannot be the only way to preserve a reasonable experience. On return, they still need information about the data and a way back to their place. Test that route independently of the dialog itself.

:::serviceCallout [REL-02: Aeneia Design. Let us design an interruption after which your client understands the state of their data. We will arrange the warning, sign-in again and return to the right activity in line with how your site works. Button: Design a clear return after session expiry. Destination and service scope unresolved.] :::
Signing in should return the person to the right work
After confirming identity, the editor wants to return to a specific project. Sending them to the dashboard home page makes them find it again. If there are similar entries, they could open the wrong one. Preserve recognisable context: the title, identification of the material and the point where editing stopped.
For long content, check the place where editing resumes. The editor may have been changing the caption of the last photograph, with a panel expanded and a missing-information message visible. Restoring values at the top of a long page still leaves them searching. Agree which elements of context are worth restoring and show them recognisably. A recovered form should allow the person to continue without searching the entire project for the interrupted task.
The guide to a form completed over several visits (in Polish) describes a saved draft. After session expiry you also need to distinguish the part whose save was not confirmed. If both states look the same, a person may think they have recovered all their text when they see only an earlier version.
For the test, enter two easily distinguishable paragraphs. Save the first and add the second just before the interruption. After signing in, check for both and for the message about their status. Acceptance should not end with "the form appeared". You are assessing the person's content and whether it can still be edited.
If renewing access requires another view, decide what remains in the original one. The editor may return to an old tab where the former message is still visible. They need to recognise where to act and whether the state needs refreshing. Guessing which of three windows is signed in should not become another editorial task.
Interrupt sign-in as well. In a test environment, enter incorrect credentials, go back and then try confirming identity again. Check that the route still leads to the same work. A failed sign-in message should not suggest a draft was lost when the problem concerns access alone. On the next attempt, the editor needs the return destination preserved. Otherwise a password mistake can end at the home screen even though the draft still exists.
Test signing in to another account. Regaining access should not automatically reveal the previous person's material. Agree with the implementer how retained work is linked to an authorised user. The resumption message must reflect that link, especially on a shared computer.
Distinguish expiry from a deliberate sign-out. Someone finishing work on a shared device makes a different decision from someone who missed a warning. In the test, use the browser's back button to return to the earlier dashboard and check what can be seen and done. The appearance of an old view does not prove access has been restored. The state must follow the agreed rules for the person now using the device, rather than automatically inviting them to resume somebody else's editing.
Consider someone unable to sign in now. They may not have the required verification method available. They need to know whether their work will wait and for how long under the agreed rules. If recovery requires help from the team, provide a recognisable draft identifier instead of asking them to reproduce the text in another request.
In checkout without an account (in Polish), completing an action is separated from registration. Likewise, do not direct someone to create a new account when the problem is access to work already started. A new identity may not open the previous draft. The next step should follow the actual state of the account and data.
The session may have ended while an operation continued
The editor presses "Save" and then sees a sign-in request. It is not yet known whether the request arrived or what happened to it. On return, first reconstruct the operation's state. Repeating it is not always appropriate, particularly when the button publishes material or starts work outside the dashboard.
Add a photograph to the test material whose upload takes longer than saving a short description. Expiry may occur between those actions. Check the text, file and their connection to the project separately. A list may show the selected photo even though it has not yet been attached to the document. Once access returns, the editor must recognise whether to retry that specific action or find the finished material. Showing the file name again does not settle the question.
For a long-running task on a website (in Polish), a result may be produced independently of the open tab. After regaining access the person must find the right task and its status. "Session expired" does not explain whether a package was interrupted, completed or is still waiting to run.
Name the next button according to the confirmed situation. "Return to draft", "Check save result" and "Retry save" are not interchangeable: each assumes different knowledge about the previous attempt. In a contact form (in Polish), a similar distinction can determine whether the user accidentally submits another enquiry.
Accept the entire flow on an agreed version of the site: extension, no response, expiry, return and an operation started just before interruption. In each test compare the visible message with retained content and the system-side result. A quick dialog-only test cannot show whether recovery leads to the right material.
Agree how expiry will be triggered in the test environment. Manually opening a warning mockup tests a different part of the flow from actual loss of access. An implementer can prepare a controlled scenario with a known last save and session state. This lets the team compare expectations with the result. Record the version and test conditions so another person can reproduce the issue after a fix rather than waiting beside a randomly opened tab.
Bring a description of one such interruption and the data expected to remain to a discussion with Aeneia Design. It can help determine the states to design and acceptance conditions. After returning, the user should know where their work is and what decision remains, rather than starting the same paragraph again.









