Accessibility testing in your CI pipeline
On every release, Odeet scans the pages you choose, on desktop and mobile, and fails the pipeline if the score drops below your threshold. The full report stays in your dashboard.
What to know
- Pro plan only: 300 CI scans over a rolling 30 days, on top of the 100 audits.
- Only the listed pages are scanned, up to 20; without a list, the home page only.
- The site must be reachable from the internet: Odeet refuses private network addresses.
- The Odeet score is a technical indicator, not a compliance rate.
1. Create an API key
- 1In Odeet, open Settings, Integrations section, then click Create a key.
- 2Name it after the project or client, then copy it: it is shown only once.
- 3Save it as a CI secret named ODEET_API_KEY.
The organization owner and admins create and revoke keys. A revoked key stops working immediately.
2. Add the step to your pipeline
name: Accessibilité
on:
push:
branches: [main]
jobs:
odeet:
runs-on: ubuntu-latest
steps:
- name: Odeet accessibility
run: |
curl --fail-with-body --max-time 1500 https://dashboard.odeet.fr/api/ci/gate \
-H "Authorization: Bearer ${{ secrets.ODEET_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{"siteUrl":"https://preprod.example.com","urls":["/contact","/cart"],"minScore":80}'accessibility:
stage: test
image: curlimages/curl:8.11.1
script:
- >
curl --fail-with-body --max-time 1500 https://dashboard.odeet.fr/api/ci/gate
-H "Authorization: Bearer $ODEET_API_KEY"
-H "Content-Type: application/json"
-d '{"siteUrl":"https://preprod.example.com","minScore":80}'curl --fail-with-body --max-time 1500 https://dashboard.odeet.fr/api/ci/gate \
-H "Authorization: Bearer $ODEET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"siteUrl":"https://preprod.example.com","urls":["/contact"],"minScore":80}'The call waits for the scan to finish, up to 20 minutes, then responds. With --fail-with-body, curl fails if the score is below the threshold and prints the response in the pipeline log.
Parameters
| Field | Value |
|---|---|
| siteUrl | Website address, required. |
| urls | Pages to scan besides the home page, same domain, up to 20. |
| minScore | Pass threshold, from 0 to 100. Defaults to 70. |
| wait | false to respond at once and track the scan separately. Defaults to true. |
| locale | fr or en: language of error messages and of the Slack message. |
Responses
| Code | Meaning |
|---|---|
| 200 | Scan finished, score at or above the threshold. |
| 422 | Scan finished, score below the threshold: the pipeline fails. |
| 202 | Scan still running (wait set to false or wait exceeded): follow statusUrl. |
| 400 | Invalid or unreachable address, or outside the domain. |
| 401 | Missing, invalid or revoked key. |
| 403 | The organization has no active Pro subscription. |
| 409 | Two scans of the organization are already queued: retry after Retry-After. |
| 429 | CI scan quota reached, or too many calls in a short time. |
| 500 | The scan could not complete. |
{
"scanId": "…",
"auditId": "…",
"status": "completed",
"passed": true,
"score": 86,
"threshold": 80,
"level": "Bon",
"totalViolations": 4,
"counts": { "critical": 0, "serious": 1, "moderate": 2, "minor": 1 },
"reportUrl": "https://dashboard.odeet.fr/audit/…"
}Tracking a scan without waiting
If your tool limits how long a step may run, start the scan with "wait": false, then poll the returned status URL.
# 1. Start without waiting: 202 response with statusUrl
curl https://dashboard.odeet.fr/api/ci/gate \
-H "Authorization: Bearer $ODEET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"siteUrl":"https://preprod.example.com","wait":false}'
# 2. Track: 202 while the scan runs, then 200 or 422
curl --fail-with-body https://dashboard.odeet.fr/api/ci/scans/SCAN_ID \
-H "Authorization: Bearer $ODEET_API_KEY"Available on the Pro plan
Continuous integration, Slack and monitoring, on top of 100 audits over 30 days.
See the Pro plan