-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
A11Y Setup #1016
Conversation
- 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
RISDEV-6515
|
|
There was a problem hiding this 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 |
There was a problem hiding this comment.
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** |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
RISDEV-6515