Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ jobs:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- run: npm install
- run: npm test
- run: npm run build
- run: npm run lint
- name: Install dependencies
working-directory: ./frontend
run: npm ci
Expand Down
29 changes: 29 additions & 0 deletions frontend/ACCESSIBILITY_TESTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Accessibility Testing

## Running the tests

```bash
cd frontend
npm test
```

This runs vitest in single-pass mode and prints a verbose result for every test.

For watch mode during development:

```bash
npm run test:watch
```

## What is covered

- `src/test/accessibility.test.tsx` — automated axe scan + keyboard behaviour for the shared `Navbar` component
- axe violation scan (checks roles, labels, landmark structure)
- keyboard Escape key does not trigger unrelated controls
- mobile menu toggle opens/closes correctly

## Adding more tests

1. Create a file under `src/test/` or co-locate as `ComponentName.a11y.test.tsx`.
2. Import `axe` and `toHaveNoViolations` from `jest-axe`, extend `expect`, render, and call `axe(container)`.
3. Mock `next/navigation` and any context providers the component needs (see the existing test for examples).
Loading
Loading