Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A11Y Setup #1016

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

A11Y Setup #1016

wants to merge 7 commits into from

Conversation

hamo225
Copy link
Member

@hamo225 hamo225 commented Feb 19, 2025

RISDEV-6515

- Uninstalled axe-playwright and installed axe-core
- Added a11y utilities for tests

RISDEV-6515
- Scans for accessibility violations using axe-core

RISDEV-6515
- Updated `playwright.config.ts` to include a11y project
- Ensured `vitest.config.ts` excludes Playwright tests

RISDEV-6515
@hamo225 hamo225 requested a review from andreasphil February 19, 2025 15:40
Copy link
Member

@andreasphil andreasphil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hamo225 what about tests for the other views? I think we discussed this but don't remember what the agreement was.

@@ -58,7 +58,11 @@ jobs:
npm run build
npm run preview -- --port 5173 &
DEV_PID=$!
npm run test:e2e -- --project ${{ inputs.project }} --repeat-each 1
if [[ "${{ inputs.project }}" == "a11y" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: why is this necessary? This should work:

npm run test:e2e -- --project a11y --repeat-each 1

As far as I can tell both branches of the if to the same thing.


The project includes automated accessibility (a11y) testing using [axe-core](https://github.com/dequelabs/axe-core).

### **Running Accessibility Tests**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: remove **

@@ -0,0 +1,20 @@
import { AxeBuilder } from "@axe-core/playwright"
Copy link
Member

@andreasphil andreasphil Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: rename this file to a11y-utils.ts or something like that. .utils.ts (with a dot) suggests a specific convention for filenames or purpose of the file which we don't have for utils.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants