Skip to content

Tooling: install the jsx-a11y plugin#377

Merged
rami-elementor merged 22 commits into
core-betafrom
jsx-a11y
May 17, 2026
Merged

Tooling: install the jsx-a11y plugin#377
rami-elementor merged 22 commits into
core-betafrom
jsx-a11y

Conversation

@rami-elementor
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-a11y to ESLint flat config and configure initial a11y rule severities.
  • Add @axe-core/playwright and 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.

Comment thread tests/e2e/accessibility.spec.ts Outdated
Comment thread tests/e2e/accessibility.spec.ts Outdated
Comment thread tests/e2e/accessibility.spec.ts Outdated
Comment thread tests/e2e/accessibility.spec.ts Outdated
Comment thread .github/workflows/lint.yml
Comment thread package.json
Comment thread tests/e2e/accessibility.spec.ts Outdated
@rami-elementor rami-elementor marked this pull request as draft May 2, 2026 07:28
@rami-elementor rami-elementor marked this pull request as ready for review May 5, 2026 20:45
@rami-elementor rami-elementor requested a review from a team May 5, 2026 20:48
@rami-elementor rami-elementor changed the title Tooling: install the jsx-a11y plugin Tooling: install the jsx-a11y plugin + add accessibility tests May 6, 2026
@louiswol94 louiswol94 added the run-tests Trigger automated tests label May 6, 2026
@louiswol94
Copy link
Copy Markdown
Contributor

Add the beta branches as well?

@louiswol94
Copy link
Copy Markdown
Contributor

await page.waitForLoadState('networkidle') has been very flaky in Elementor's code base. Prefer to wait for a stable selector.

@louiswol94
Copy link
Copy Markdown
Contributor

Seems like the Playwright tests are failing: https://github.com/codesnippetspro/code-snippets/actions/runs/25452573742/job/74673455166?pr=377

@rami-elementor
Copy link
Copy Markdown
Contributor Author

rami-elementor commented May 14, 2026

@louiswol94 moving the tests to a separate PR.

@rami-elementor rami-elementor changed the title Tooling: install the jsx-a11y plugin + add accessibility tests Tooling: install the jsx-a11y plugin May 14, 2026
@github-actions
Copy link
Copy Markdown

PHPUnit Test Failure

One or more PHP version targets failed in this workflow run.

See all PHPUnit errors (click to expand)

Affected PHP version: all

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:106

Affected PHP version: all

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:106

Affected PHP version: all

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:106

Please review the failing jobs and fix the issues before merging.

@rami-elementor rami-elementor merged commit 08f33ef into core-beta May 17, 2026
6 of 20 checks passed
@rami-elementor rami-elementor deleted the jsx-a11y branch May 17, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-tests Trigger automated tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants