PDF kit command
accessibility.check
Check for accessibility
Run the Accessibility Checker's full check (32 rules in 7 categories: document, page_content, forms, alternate_text, tables, lists, headings). Each rule is passed, failed (with findings and pages), manual (needs a person) or skipped. Colour contrast is off unless all is true; rules (ids such as tagged-pdf, figures-alt-text) or categories narrow the check; pages limit the page rules.
- Kit
- PDF 0.1.0 (.pdf)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
all | boolean | no | Include rules that are off by default (colour contrast). |
categories | ("document" | "page_content" | "forms" | "alternate_text" | "tables" | "lists" | "headings")[] | no | |
pages | integer[] | no | 1-based page numbers for the page rules (default: all). (minItems 1) |
rules | string[] | no |
Call through pdf_run
pdf_run {
"path": "<file>.pdf",
"steps": [{ "command": "accessibility.check" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: all, categories, pages, rules. pdf_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
failed | number | no | |
manual | number | no | |
passed | number | no | |
results | object[] | no | |
skipped | number | no |
Result JSON Schema
{
"additionalProperties": true,
"properties": {
"failed": {
"type": "number"
},
"manual": {
"type": "number"
},
"passed": {
"type": "number"
},
"results": {
"items": {
"additionalProperties": true,
"properties": {
"category": {
"type": "string"
},
"findings": {},
"name": {
"type": "string"
},
"rule": {
"type": "string"
},
"status": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"skipped": {
"type": "number"
}
},
"type": "object"
}Parameter schema
{
"additionalProperties": false,
"properties": {
"all": {
"description": "Include rules that are off by default (colour contrast).",
"type": "boolean"
},
"categories": {
"items": {
"enum": [
"document",
"page_content",
"forms",
"alternate_text",
"tables",
"lists",
"headings"
],
"type": "string"
},
"type": "array"
},
"pages": {
"description": "1-based page numbers for the page rules (default: all). (minItems 1)",
"items": {
"description": "(minimum 1)",
"type": "integer"
},
"type": "array"
},
"rules": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (pdf_commands through @kition/[email protected], built from KitionAI/kition-pdf@b0d2725). As data: commands.jsonl.