Reference
The rules
Ten content rules over DOCX and PPTX parts, each mapped to the WCAG criterion it supports, plus an OOXML-000 fallback for a package that cannot be opened.
How the audit reads OOXML parts
officelens opens the package, indexes its parts and relationship graphs, then follows the relationships to the main document part or the presentation part. It parses the XML directly and never renders the file.
<wp:docPr id="1" name="Picture 1" descr="Quarterly revenue bar chart"/>
A DOCX drawing or a PPTX shape carries its alternative text in descr. The rules read that attribute straight from the part, so a missing one is reported before the file ever reaches a renderer.
The ten rules
Six DOCX rules and four PPTX rules cover images, headings, tables, language, and link text.
| Code | Severity | WCAG | Check |
|---|---|---|---|
DOCX-ALT-001 | error | 1.1.1 | Drawing (wp:docPr) or VML image (v:shape) without descr, alt, or title; drawings with their own text body are skipped |
DOCX-HEAD-002 | warning | 1.3.1 | Body text but no headings at all |
DOCX-HEAD-003 | warning | 1.3.1 | Heading levels skip (for example H1 → H3) |
DOCX-LANG-004 | warning | 3.1.1 | No default language (w:lang in docDefaults or a default style, dc:language, or w:themeFontLang) |
DOCX-TBL-005 | error | 1.3.1 | Table whose first row is not a header (w:tblHeader) |
DOCX-LINK-006 | warning | 2.4.4 | Hyperlink whose visible text contains a raw URL or a mailto:/tel: address |
| Code | Severity | WCAG | Check |
|---|---|---|---|
PPTX-ALT-001 | error | 1.1.1 | Picture or shape (a:cNvPr) without descr; placeholders are skipped |
PPTX-TITLE-002 | warning | 1.3.1 | Slide without a title placeholder, after checking the slide layout |
PPTX-TBL-003 | warning | 1.3.1 | Table not marked with firstRow="1" |
PPTX-LANG-004 | warning | 3.1.1 | Slide text with no run language (a:rPr@lang, a:endParaRPr, or inherited p:txStyles) |
DOCX rules also run over header, footer, footnote, endnote, and comment parts resolved from relationships.
How a file is checked
The pipeline is static and has no rendering step.
-
Open the package
Unzip the OOXML container with
fflateand index its parts and relationship graphs. -
Resolve the entry point
Follow the relationships to the main document part or the presentation part.
-
Parse the XML
fast-xml-parserreads it with attributes enabled, so the rules see structure and content, never a render. -
Run the rules and report
Deterministic rule functions emit issues, then text, JSON, or SARIF 2.1.0 is written and the exit code is set for CI.
OOXML-000
If a file cannot be opened as an OOXML package, or has no DOCX or PPTX main part, officelens reports one OOXML-000 (error) issue instead of an empty pass, and the CLI exits 2.