WCAG 2.2.5: Re-authenticating
WCAG 2.2.5 Re-authenticating (Level AA): Restore Session Without Data Loss
WCAG 2.2.5 Re-authenticating is a critical success criterion introduced in WCAG 2.1, rated at Level AA. Its primary goal is to ensure that when a user’s authenticated session expires and they are required to re-authenticate, they can resume their activity exactly where they left off, without losing any previously entered data or settings. This criterion addresses a common source of frustration and inaccessibility on the web, particularly for users engaged in complex or time-consuming tasks.
Why This Criterion Matters
The ability to re-authenticate and continue an activity without data loss is fundamental for an accessible and user-friendly experience. Losing data due to a session timeout can have significant negative impacts, especially for certain user groups:
In essence, this criterion minimizes unnecessary effort, reduces cognitive load, and prevents user frustration, making web applications more robust and inclusive for everyone.
Success Criterion and Requirements
The WCAG 2.2.5 Re-authenticating (Level AA) success criterion states:
When an authenticated session expires, the user can re-authenticate and continue activity without loss of data or settings of that activity.
Exceptions:
There are specific situations where this criterion does not apply:
Practical Guidelines for Compliance
Achieving compliance with WCAG 2.2.5 involves implementing strategies that preserve user data and context across session boundaries. This typically involves a combination of server-side and client-side techniques.
1. Server-Side Session Management:
2. Client-Side Data Preservation (for temporary or less critical data):
3. User Notification and Session Extension:
Examples of Correct and Incorrect Implementations
Correct Implementation: Multi-Step Form with Session Restoration
In this example, user input from a multi-step form is saved using `localStorage` on the client-side. Upon re-authentication, this data is used to pre-fill the form, and the user is redirected to their last known step.
HTML (Part of a multi-step form)
JavaScript (Client-side logic)
Incorrect Implementation: Data Loss on Re-authentication
In this scenario, a user fills out a substantial form. Their session expires, they are redirected to the login page, and upon successful re-authentication, they are taken back to an empty form or the application’s homepage, losing all their previously entered data.
Scenario Description:
A user is filling out a detailed support request form with multiple text areas and file uploads. After spending 15 minutes drafting their issue, their session times out. They are redirected to the login page. Upon logging back in, they are sent to the application’s dashboard. Navigating back to the support request form, they find all fields are empty, and their drafted message is gone.
Problematic Code/Logic (Conceptual):
Best Practices and Common Pitfalls
Best Practices:
Common Pitfalls:
Conclusion
WCAG 2.2.5 Re-authenticating is about respect for the user’s time and effort. By implementing strategies that preserve data and context across authenticated sessions, developers and designers can create more robust, user-friendly, and inclusive web applications that truly support all users, regardless of their abilities or circumstances. Adherence to this criterion significantly enhances the overall accessibility and usability of authenticated web experiences.
Related posts
- WCAG 5.2.3: Complete processes
- WCAG 5.2.4: Only Accessibility-Supported Ways of Using Technologies
- WCAG 5.2.5: Non-Interference
- WCAG 5.3.1: Required elements of the conformity declaration
- WCAG 5.3.2: Optional Components of a Conformance Claim
Still looking for answers?
Ask our experts using online chat