Tooling: install the jsx-a11y plugin#377
Conversation
There was a problem hiding this comment.
Pull request overview
Adds accessibility-focused tooling and checks to the Code Snippets repo by introducing JSX a11y linting rules, adding axe-core based Playwright accessibility tests, and wiring up a dedicated CI lint workflow.
Changes:
- Add
eslint-plugin-jsx-a11yto ESLint flat config and configure initial a11y rule severities. - Add
@axe-core/playwrightand a new Playwright E2E accessibility spec that runs axe against key admin screens. - Introduce a new GitHub Actions workflow to run CSS/JS/PHP linting on PRs and branch pushes.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
tests/e2e/accessibility.spec.ts |
New axe-core Playwright spec covering several WP admin/plugin screens. |
package.json |
Adds devDependencies for axe Playwright integration and eslint-plugin-jsx-a11y. |
package-lock.json |
Lockfile updates for the new devDependencies and transitive packages. |
eslint.config.mjs |
Enables jsx-a11y recommended flat config and adds explicit a11y rule severity overrides. |
.github/workflows/lint.yml |
New CI workflow intended to run stylelint, eslint, and PHP CS. |
Agent-Logs-Url: https://github.com/codesnippetspro/code-snippets/sessions/2bb9d8a2-f530-4f0c-b4d1-c50042562680 Co-authored-by: rami-elementor <92088692+rami-elementor@users.noreply.github.com>
|
Add the beta branches as well? |
|
|
|
Seems like the Playwright tests are failing: https://github.com/codesnippetspro/code-snippets/actions/runs/25452573742/job/74673455166?pr=377 |
|
@louiswol94 moving the tests to a separate PR. |
PHPUnit Test FailureOne or more PHP version targets failed in this workflow run. See all PHPUnit errors (click to expand)Affected PHP version: PHPUnit\Framework\ExpectationFailedException
Code_Snippets\Tests\REST_API_Cloud_Test::test_get_items_caps_snippets_per_page_user_option_at_one_hundred
Failed asserting that 404 is identical to 200.
/home/runner/work/code-snippets/code-snippets/tests/phpunit/test-rest-api-cloud.php:198
phpvfscomposer:///home/runner/work/code-snippets/code-snippets/src/vendor/phpunit/phpunit/phpunit:106Affected PHP version: PHPUnit\Framework\ExpectationFailedException
Code_Snippets\Tests\REST_API_Cloud_Test::test_get_items_respects_explicit_per_page_request
Failed asserting that 404 is identical to 200.
/home/runner/work/code-snippets/code-snippets/tests/phpunit/test-rest-api-cloud.php:221
phpvfscomposer:///home/runner/work/code-snippets/code-snippets/src/vendor/phpunit/phpunit/phpunit:106Affected PHP version: PHPUnit\Framework\ExpectationFailedException
Code_Snippets\Tests\REST_API_Cloud_Test::test_get_items_uses_snippets_per_page_user_option
Failed asserting that 404 is identical to 200.
/home/runner/work/code-snippets/code-snippets/tests/phpunit/test-rest-api-cloud.php:176
phpvfscomposer:///home/runner/work/code-snippets/code-snippets/src/vendor/phpunit/phpunit/phpunit:106Please review the failing jobs and fix the issues before merging. |
No description provided.