fix(a11y): add prefers-reduced-motion support for auth page

- Disable auth-card entrance animation when user prefers reduced motion
- Disable auth-footer link color transition
- Respects WCAG accessibility guidelines for vestibular disorders
This commit is contained in:
Arnaud Dartois committed 2026-07-19 15:49:13 +00:00
1 parent 898a9be6fa
commit f0083de97d
2 files changed
+30

No files matched your search

+18
View File
@@ -98,6 +98,24 @@ builder.Services.AddAuthentication(options =>
ValidateLifetime = true,
ClockSkew = TimeSpan.Zero
};
// SignalR WebSocket transport sends JWT as access_token query parameter
options.Events = new JwtBearerEvents
{
OnMessageReceived = context =>
{
var accessToken = context.Request.Query["access_token"];
var path = context.HttpContext.Request.Path;
if (!string.IsNullOrEmpty(accessToken) &&
path.StartsWithSegments("/hubs"))
{
context.Token = accessToken;
}
return Task.CompletedTask;
}
};
})
.AddScheme<ApiKeyAuthenticationOptions, ApiKeyAuthenticationHandler>("ApiKey", null);
+12
View File
@@ -247,6 +247,18 @@ code {
text-decoration: underline;
}
/* ─── Accessibility ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
.auth-card {
animation: none;
}
.auth-footer a {
transition: none;
}
}
/* ─── Dark mode for auth pages ──────────────────────────────────── */
@media (prefers-color-scheme: dark) {