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

Integrate Accessibility Results API #1336

Open
gert-janvercauteren opened this issue Dec 31, 2024 · 2 comments
Open

Integrate Accessibility Results API #1336

gert-janvercauteren opened this issue Dec 31, 2024 · 2 comments
Labels

Comments

@gert-janvercauteren
Copy link

Integrate Accessibility Results API

Improvement
We aim to use the Accessibility Results API script as described. Still, we are concerned that setting up bespoke scripts for each team will create unnecessary maintenance overhead for the enablement teams.

Proposal
Could this script be wrapped in a GitHub Action that accepts configuration inputs such as project key and rules that are allowed to fail?
This would minimise maintenance effort, enable swift upgrade PRs for the action version, and allow teams to quickly manage which rules can fail in their repositories.

Bonus Points
It would be ideal if the script’s output could be posted as a comment on the PR, highlighting failing rules or identifying rules that pass and could be removed from the configuration.

Thank you! 🙇

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Jan 2, 2025

@gert-janvercauteren

The example workflow in the documentation section https://docs.cypress.io/accessibility/results-api#Example-Job-Workflow-Update on the page Accessibility > Results API that you reference does not use the action cypress-io/github-action (see below for a copy), so this would be a question / suggestion for the Cypress Cloud team.

I haven't seen any discussions on this in the Cypress technical community on Discord, which is where "how-to" implementation issues are often discussed. You can connect to the community on

Discord chat (click on button)


https://docs.cypress.io/accessibility/results-api#Example-Job-Workflow-Update

name: My Workflow
on: push

env:
  CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}

jobs:
  run-cypress:
    runs-on: ubuntu-24.04
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: install
        run: npm install
      - name: Run
        run: npx cypress run --record
+     - name: Verify Accessibility Results
+       run: |
+          npm install --force https://cdn.cypress.io/extract-cloud-results/v1/extract-cloud-results.tgz
+          node ./scripts/verifyAccessibilityResults.js

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Jan 2, 2025

We'd be interested in exploring this, although it's unlikely out team can spend time implementing itself. I think the main thing would be settling on an API ahead of time. This 'allowed-failing-rules' feels a bit backwards in its wording, but just throwing out some idea to brainstorm. cc @marktnoonan

We have a

      - name: Validate Accessibility Results
        uses: cypress-io/github-action@v4
        with:
          project-key: ${{ secrets.CYPRESS_PROJECT_KEY }}
          record-key: ${{ secrets.CYPRESS_RECORD_KEY }}
          a11y-allowed-failing-rules: "rule1,rule2"
          a11y-score-threshold: 85

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

No branches or pull requests

3 participants