Free plan

Accessibility audit

Check a web page for problems that block people with disabilities
POST
/v1/documents/accessibility

About this tool

This tool checks the code of a web page (HTML) against about thirty accessibility rules (WCAG 2.1 levels A and AA). They help people who use screen readers (software that reads aloud) or only a keyboard. It looks at pictures, forms, links, headings, tables, colours and more, and for each problem tells you what to fix. It checks code, not the finished page.
For example, you check a page of your website to find pictures with no description for blind visitors.

How to use it

  1. Choose this tool.
  2. Add your HTML file, or paste the HTML code into the box.
  3. If you only have a piece of a page, turn on the fragment option.
  4. If you like, choose the level and the smallest problem size to show.
  5. Press Generate, then read the list of problems.

What you get back

You get a list of problems, each with the element, the rule it breaks and what to do. You can copy or download it.
GOOD TO KNOW
A rule-based check of the HTML, not a full conformance audit: it needs a person to judge alt text, reading order and keyboard use. The HTML is parsed, never run. Counts as one document.
TEST IT LIVE

Try Accessibility audit in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Documents
Plan
Free
Method
POST
Endpoint
/v1/documents/accessibility
Tool ID
documents.accessibility
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Documents
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/documents/accessibility" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'html=<img src="a.png"><button></button>' \
  -F 'level=AA' \
  -F 'min_impact=minor'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.accessibility({
    "html": "<img src=\"a.png\"><button></button>",
    "level": "AA",
    "min_impact": "minor"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->accessibility([
    'html' => '<img src="a.png"><button></button>',
    'level' => 'AA',
    'min_impact' => 'minor',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Check an HTML page or fragment against about thirty WCAG 2.1 (A and AA) rules: images, forms, links, headings, tables, media, ARIA, keyboard and colour contrast, with the element, the criterion and what to do.

Accessibility audit works from text and settings, so no file is needed. Every input is optional.

Accessibility audit is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/documents/accessibility with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.