Add accessibility improvements (P4.2 partial)
All checks were successful
Deploy / deploy (push) Successful in 1m36s

- Add skip navigation link to root layout
- Add semantic HTML landmarks (main element) to login and settings pages
- Add aria-labels to calendar day buttons with date, cycle day, and phase info
- Add id="main-content" to dashboard main element for skip link target
- Fix pre-existing type error in auth-middleware.test.ts

Tests: 781 passing (11 new accessibility tests)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-11 21:49:26 +00:00
parent 2bfd93589b
commit 649fa29df2
12 changed files with 259 additions and 34 deletions

View File

@@ -505,4 +505,24 @@ describe("SettingsPage", () => {
expect(screen.queryByText(/settings saved/i)).not.toBeInTheDocument();
});
});
describe("accessibility", () => {
it("wraps content in a main element", async () => {
render(<SettingsPage />);
await waitFor(() => {
expect(screen.getByRole("main")).toBeInTheDocument();
});
});
it("has proper heading structure with h1", async () => {
render(<SettingsPage />);
await waitFor(() => {
const heading = screen.getByRole("heading", { level: 1 });
expect(heading).toBeInTheDocument();
expect(heading).toHaveTextContent(/settings/i);
});
});
});
});