Accessibility fixes.
Some checks are pending
Test / vitest (push) Waiting to run
Test / playwright (push) Blocked by required conditions
Test / visual (push) Blocked by required conditions

This commit is contained in:
Jennie Robinson Faber 2026-04-05 16:03:10 +01:00
parent 4aacb26c4b
commit 88c94aaaf4
12 changed files with 276 additions and 260 deletions

View file

@ -256,22 +256,21 @@ const copyCalendarLink = async () => {
const { openLoginModal } = useLoginModal();
// Handle authentication check on page load
// server: false ensures this always runs on the client, even on a hard page load.
// The auth middleware only fires for client-side navigations in Nuxt 4, so we
// can't rely on it to open the modal when the user lands directly on this URL.
const { pending: authPending } = await useLazyAsyncData(
"dashboard-auth",
async () => {
// Only check authentication on client side
if (process.server) return null;
// If no member data, try to authenticate
if (!memberData.value) {
const isAuthenticated = await checkMemberStatus();
if (!isAuthenticated) {
// Show login modal instead of redirecting
openLoginModal({
title: "Sign in to your dashboard",
description: "Enter your email to access your member dashboard",
title: "Sign in to continue",
description: "You need to be signed in to access this page",
dismissible: true,
redirectTo: "/member/dashboard",
});
return null;
}
@ -279,6 +278,7 @@ const { pending: authPending } = await useLazyAsyncData(
return memberData.value;
},
{ server: false },
);
// Load registered events