Skip to content

Integrate Accessibility Results API #1336

Open

Description

@gert-janvercauteren

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! 🙇

Activity

  1. MikeMcC399 commented on Jan 2, 2025

    @MikeMcC399
    Collaborator

    @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
  2. jennifer-shehane commented on Jan 2, 2025

    @jennifer-shehane
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions