Suppress an accessibility finding
const url = 'https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/a11y-suppressions';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"rule":"color-contrast","selector":".hero .tagline","reason":"Brand colors; approved by design."}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/a11y-suppressions \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "rule": "color-contrast", "selector": ".hero .tagline", "reason": "Brand colors; approved by design." }'Create an “Ignore” suppression for an accessibility finding. Scope is set by which fields are provided:
ruleonly — suppress the rule site-wide.rule+selector— suppress that element wherever it appears.rule+selector+pageUrl— suppress that one occurrence.
Suppressions apply retroactively (the report recomputes) and are reversible via the delete endpoint.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The site’s UUID.
Request Bodyrequired
Section titled “ Request Bodyrequired ”object
The axe-core rule id to suppress.
Limit the suppression to elements matching this selector.
Limit the suppression to this page (requires selector to pinpoint one occurrence).
Why the finding is being ignored, for the audit trail.
Example
{ "rule": "color-contrast", "selector": ".hero .tagline", "reason": "Brand colors; approved by design."}Responses
Section titled “ Responses ”Suppression created.
object
A stored “Ignore” suppression.
object
CSS selector to match; null = any element.
Page to match; null = any page.
The user who created the suppression, if known.
Epoch ms.
Examplegenerated
{ "suppression": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tenant_id": "example", "site_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rule": "example", "selector": "example", "page_url": "example", "reason": "example", "created_by": "example", "created_at": 1 }}rule is missing.
object
A human-readable error message.
Example
{ "error": "rule is required"}Missing or invalid credentials.
object
A human-readable error message.
Example
{ "error": "invalid api key"}No site with that id is visible to the caller.
object
A human-readable error message.
Example
{ "error": "site not found"}