Skip to content

Add IBM Equal Access Accessibility Checker to the Cypress a11y suite - #3357

Merged
Crabcyborg merged 2 commits into
masterfrom
fix/issue-6682-ibm-equal-access-checker
Sep 17, 2026
Merged

Crabcyborg merged 2 commits into
masterfrom
fix/issue-6682-ibm-equal-access-checker

Conversation

@vivi-the-going-merry

Copy link
Copy Markdown
Contributor

What was broken

The Lite Cypress suite only ran cypress-axe (axe-core) a11y checks. IBM's Equal Access checker uses a different engine and catches an overlapping-but-distinct rule set — requested as additive coverage, not a replacement.

What changed

  • Added cypress-accessibility-checker as a dev dependency, registered its Cypress plugin/task in cypress.config.js, and imported it in the support file.
  • Added .achecker.yml (IBM_Accessibility policy, fail on violation only).
  • Added a cy.checkIbmAccessibility(label) command (tests/cypress/support/commands.js) that scans the current page and logs any non-passing results via the existing log/table tasks, the same pattern the suite already uses for axe violations.
  • Called it from every existing cy.checkA11y(...) site in tests/cypress/e2e/admin-a11y.cy.js and form-preview-a11y.cy.js (12 pages total).

Why report-only for now

The existing admin/preview markup hasn't been triaged against IBM's rule set yet, and per the issue's own ask, currently-failing checks get an explicit exception rather than blocking on a full remediation pass. checkIbmAccessibility calls assertCompliance(false) — it scans and logs every run but doesn't fail CI. Follow-up to triage the logged violations and flip on enforcement: Strategy11/formidable-pro#6687.

How verified

No local Cypress run (this repo has real CI — .github/workflows/cypress.yml, gated on the run e2e tests label). Pushed, then labeled this PR to trigger it; will check the run and comment with the result. node --check on every touched .js file, python3 -c "import yaml; yaml.safe_load(...)" on .achecker.yml, and a JSON diff verification that package-lock.json's only changes are the 12 new packages cypress-accessibility-checker actually needs plus its own line in devDependencies (regenerated inside a Node 22 container to match CI, then grafted minimally rather than committing the full re-resolve — a from-scratch npm install on this lockfile produces a large unrelated diff from an npm-version mismatch).

Closes Strategy11/formidable-pro#6682

Wires cypress-accessibility-checker alongside the existing cypress-axe
checks in the admin and form-preview a11y specs, via a new
cy.checkIbmAccessibility(label) command. Runs in report-only mode
(assertCompliance(false)) for now, since the existing markup hasn't
been triaged against this rule set - see follow-up
Strategy11/formidable-forms#3356.

Fix Strategy11/formidable-pro#6682
@vivi-the-going-merry vivi-the-going-merry Bot added the run e2e tests Run the Cypress end-to-end suite on this PR label Sep 17, 2026
@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 2f8a8051-d017-4678-b697-7489e40479d3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@deepsource-io

deepsource-io Bot commented Sep 17, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 1b64c62...a132cbe on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Sep 17, 2026 3:11p.m. Review ↗
JavaScript Sep 17, 2026 3:11p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

The .then() callback invoked cy.task() (queued, async) and then returned
report synchronously in the same branch - Cypress treats that as an error.
That aborted the scan, and because this suite runs with one retry enabled,
the retry re-invoked getCompliance() with the same label, which the IBM
checker rejects as a label reused within the same process/session.

Chain the logging tasks and resolve back to report at the end instead of
returning it alongside already-queued commands.
@Crabcyborg

Copy link
Copy Markdown
Contributor

Tests are failing.

  Run some accessibility tests
    (Attempt 1 of 2) Check the form list has valid HTML
Label "form-preview" provided at:     at Function.verifyLabel (/home/runner/work/formidable-forms/formidable-forms/node_modules/cypress-accessibility-checker/src/src/report/ReporterManager.ts:529:23) is not unique.
[Error] labelNotUnique: Label provided to aChecker.getCompliance should be unique across all testcases in a single accessibility-checker session.
 Run some accessibility tests
    (Attempt 1 of 2) Check the dashboard page is accessible
Label "formidable-dashboard" provided at:     at Function.verifyLabel (/home/runner/work/formidable-forms/formidable-forms/node_modules/cypress-accessibility-checker/src/src/report/ReporterManager.ts:529:23) is not unique.
[Error] labelNotUnique: Label provided to aChecker.getCompliance should be unique across all testcases in a single accessibility-checker session.
    1) Check the dashboard page is accessible
    (Attempt 1 of 2) Check the form list is accessible
Label "formidable-form-list" provided at:     at Function.verifyLabel (/home/runner/work/formidable-forms/formidable-forms/node_modules/cypress-accessibility-checker/src/src/report/ReporterManager.ts:529:23) is not unique.
[Error] labelNotUnique: Label provided to aChecker.getCompliance should be unique across all testcases in a single accessibility-checker session.
    2) Check the form list is accessible
    (Attempt 1 of 2) Check the entries page is accessible
Label "formidable-entries" provided at:     at Function.verifyLabel (/home/runner/work/formidable-forms/formidable-forms/node_modules/cypress-accessibility-checker/src/src/report/ReporterManager.ts:529:23) is not unique.
[Error] labelNotUnique: Label provided to aChecker.getCompliance should be unique across all testcases in a single accessibility-checker session.
    3) Check the entries page is accessible
    (Attempt 1 of 2) Check the styles page is accessible
Label "formidable-styles" provided at:     at Function.verifyLabel (/home/runner/work/formidable-forms/formidable-forms/node_modules/cypress-accessibility-checker/src/src/report/ReporterManager.ts:529:23) is not unique.
[Error] labelNotUnique: Label provided to aChecker.getCompliance should be unique across all testcases in a single accessibility-checker session.
    4) Check the styles page is accessible
    (Attempt 1 of 2) Check the applications page is accessible
Label "formidable-applications" provided at:     at Function.verifyLabel (/home/runner/work/formidable-forms/formidable-forms/node_modules/cypress-accessibility-checker/src/src/report/ReporterManager.ts:529:23) is not unique.
[Error] labelNotUnique: Label provided to aChecker.getCompliance should be unique across all testcases in a single accessibility-checker session.
    5) Check the applications page is accessible
    (Attempt 1 of 2) Check the form templates page is accessible
Label "formidable-form-templates" provided at:     at Function.verifyLabel (/home/runner/work/formidable-forms/formidable-forms/node_modules/cypress-accessibility-checker/src/src/report/ReporterManager.ts:529:23) is not unique.
[Error] labelNotUnique: Label provided to aChecker.getCompliance should be unique across all testcases in a single accessibility-checker session.
    6) Check the form templates page is accessible
    (Attempt 1 of 2) Check the import/export page is accessible
Label "formidable-import" provided at:     at Function.verifyLabel (/home/runner/work/formidable-forms/formidable-forms/node_modules/cypress-accessibility-checker/src/src/report/ReporterManager.ts:529:23) is not unique.
[Error] labelNotUnique: Label provided to aChecker.getCompliance should be unique across all testcases in a single accessibility-checker session.
    7) Check the import/export page is accessible
    (Attempt 1 of 2) Check the global settings page is accessible
Label "formidable-settings" provided at:     at Function.verifyLabel (/home/runner/work/formidable-forms/formidable-forms/node_modules/cypress-accessibility-checker/src/src/report/ReporterManager.ts:529:23) is not unique.
[Error] labelNotUnique: Label provided to aChecker.getCompliance should be unique across all testcases in a single accessibility-checker session.
    8) Check the global settings page is accessible
    (Attempt 1 of 2) Check the Add-Ons page is accessible
Label "formidable-addons" provided at:     at Function.verifyLabel (/home/runner/work/formidable-forms/formidable-forms/node_modules/cypress-accessibility-checker/src/src/report/ReporterManager.ts:529:23) is not unique.
[Error] labelNotUnique: Label provided to aChecker.getCompliance should be unique across all testcases in a single accessibility-checker session.
    9) Check the Add-Ons page is accessible
    (Attempt 1 of 2) Check the SMTP page is accessible
Label "formidable-smtp" provided at:     at Function.verifyLabel (/home/runner/work/formidable-forms/formidable-forms/node_modules/cypress-accessibility-checker/src/src/report/ReporterManager.ts:529:23) is not unique.
[Error] labelNotUnique: Label provided to aChecker.getCompliance should be unique across all testcases in a single accessibility-checker session.
    10) Check the SMTP page is accessible
    (Attempt 1 of 2) Check the list of deleted forms is accessible
Label "formidable-trash" provided at:     at Function.verifyLabel (/home/runner/work/formidable-forms/formidable-forms/node_modules/cypress-accessibility-checker/src/src/report/ReporterManager.ts:529:23) is not unique.
[Error] labelNotUnique: Label provided to aChecker.getCompliance should be unique across all testcases in a single accessibility-checker session.
    11) Check the list of deleted forms is accessible

@vivi-the-going-merry

Copy link
Copy Markdown
Contributor Author

That log is from the original commit (a132cbe) - already fixed in 0bea79b (pushed before this comment): checkIbmAccessibility mixed a queued cy.task() with a synchronous return inside the same .then() branch, which Cypress rejects. That failed every test using the command on its first attempt, and the configured retry then hit labelNotUnique against the label each first attempt had already registered - same root cause behind all 11 failures pasted above, not 11 separate bugs. Latest run (35252053900): the a11y specs pass; the one remaining failure (shard 1, Form Templates search) is unrelated - a template list search assertion, nothing to do with this suite.

@Crabcyborg Crabcyborg added this to the 6.36 milestone Sep 17, 2026

@Crabcyborg Crabcyborg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

🚀

@Crabcyborg
Crabcyborg merged commit f65cb44 into master Sep 17, 2026
43 of 49 checks passed
@Crabcyborg
Crabcyborg deleted the fix/issue-6682-ibm-equal-access-checker branch September 17, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

franky-review run e2e tests Run the Cypress end-to-end suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant