mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 10:08:00 -06:00
* M12: set a table's Summary and a header cell's Scope (#4103, #4104) accessibility_set_tag_property takes `summary` (Table tags) and `scope` (TH tags: Row, Column or Both). Both are Table attributes, written into the tag's attribute object with /O /Table in /A: an existing one is edited in place, keeping other attribute objects and their revision numbers; one reached by reference is copied into the tag's own /A first, so tags sharing it keep their value; a new one is added when there is none. Clearing drops the key, an attribute object left with only /O, and an empty /A. The tag type is checked after the role map. accessibility_tags lists both. Setting a summary clears the table-summary finding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * M12: edit the Table attribute object that holds the value (#4103, #4104) With more than one /O /Table attribute object in a tag's /A, setting a summary or scope edited the first one even when a later one held the key, and clearing left that later value in place (both still read back as the old value). Setting now edits the object holding the key (else the first Table object, else a new one), and clearing removes the key from every Table object holding it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
pdfcraft-a11y
Layer L4: accessibility (execution plan M12.3). Today: the Accessibility Checker's full check.
let report = check(&doc, &Options::default()); // 31 of 32 rules (colour contrast off)
let html = report_html(&report, "file.pdf", "2026-10-02", "en", &in_english); // or an interface's words
- 32 rules in 7 categories, as in Acrobat's full check: Document (permission flag, image-only, tagged, reading order, language, title, bookmarks, colour contrast), Page Content (tagged content, tagged annotations, tab order, character encoding, tagged multimedia, and four manual checks), Forms (tagged fields, descriptions), Alternate Text (figures, nested, associated with content, hides annotation, other elements), Tables (rows, cells, headers, regularity with row/column spans, summary), Lists (items, Lbl/LBody) and Headings (nesting).
- Each result is Passed, Failed (with findings and pages), Needs manual check, or Skipped.
- Content checks walk the page content streams (and form XObjects) tracking marked
content: painting outside MCID-marked or
/Artifactcontent is untagged. - Character encoding accepts a predefined non-Identity CJK CMap or an Adobe CJK
character collection (
GB1,CNS1,Japan1,Korea1,KR), including Identity-H/V. Unknown CMaps and foreign registries do not establish that route. This is a font-level declaration check, not validation of every ToUnicode entry or used glyph. - Structure checks read the structure tree through the role map; table regularity counts
ColSpan/RowSpanattributes. - The report is a self-contained HTML page. Fixes that edit the document (language, title, tab
order) live in the engine (
Document::accessibility_fix).
Not yet: autotagging, the Tags/Order/Content panels, the Reading Order tool (M12.1–M12.2).