fix_accessibility
Repair accessibility audit findings: add alt text placeholders, fix heading skips, set table headers, or fill missing titles. Dry-run previews changes without modifying the file.
Instructions
Repair audit_accessibility findings, one opted-in category at a time (detection mirrors the audit, so audit -> fix -> audit shows the opted-in findings resolved). Every category defaults to OFF; with none enabled the call refuses. Each category reports fixed items, skipped items with reasons, and items needing human review.
alt_text_placeholders: images without alt text get a clearly marked placeholder (never an invented description), all listed for a human pass via set_image_alt_text. heading_skips: repairs skipped levels via heading_strategy 'promote' or 'demote_following'; nested/mixed patterns, custom-style headings, and any repair that would leave a skip or remove the only Heading 1 are refused with details. table_headers: sets w:tblHeader on flagged first rows, skipping single-row tables and empty or all-numeric first rows. doc_title: fills an EMPTY title from the first Heading 1, never overwriting.
dry_run=True returns the identical report without touching the file. Auto-backup: prev/anchor slots in .ks4w-backups (backup=False skips rotation only); atomic validated save. Refuses documents open in Word.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| backup | No | ||
| dry_run | No | ||
| doc_title | No | ||
| file_path | Yes | ||
| heading_skips | No | ||
| table_headers | No | ||
| heading_strategy | No | promote | |
| alt_text_placeholders | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||