Reference
The rules
Nine odflens rule codes, each describing a specific way an OpenDocument file breaks accessibility and carrying the WCAG reference it answers to. A fatal ODF-000 reports a package that could not be audited at all.
How rules are scoped
Rules are scoped to the document kind. odflens detects ODT, ODS, or ODP and runs the checks that apply to that kind. The language, title, alt-text, link-text, and remote-image checks run for all three. The heading-outline and table-header checks run for ODT only: spreadsheets and presentations have no document heading outline, and spreadsheet header rows are frequently left unmarked, so requiring the marker there would produce false positives.
The nine rules
| Code | Severity | WCAG | Applies to | Check |
|---|---|---|---|---|
ODF-000 | error | — | all | Package is unreadable, empty, not a zip, malformed, or missing content.xml (fatal; the CLI exits 2) |
ODF-LANG-001 | error | 3.1.1 | all | No document language (dc:language or xml:lang / fo:language) |
ODF-TITLE-002 | error | — | all | No non-empty dc:title in meta.xml |
ODF-ALT-003 | error | 1.1.1 | all | Image or embedded-object frame without svg:title or svg:desc |
ODF-HEAD-004 | warning | 1.3.1 | ODT | Heading outline levels skip a level |
ODF-HEAD-005 | warning | 1.3.1 | ODT | Body text but no headings |
ODF-TBL-006 | error | 1.3.1 | ODT | Table with rows but no table:table-header-rows |
ODF-LINK-007 | warning | 2.4.4 | all | Link whose text is a raw URL |
ODF-IMG-008 | info | 1.1.1 | all | Image referenced over http(s):// |
ODF-000 is an error-severity, fatal finding: the package could not be opened or parsed at all. The CLI reports it and exits 2, so a CI gate cannot pass on a document that was never audited.
How a file is checked
The audit is static and has no rendering step.
-
Open the package
fflate unzips the ODF container;
mimetypeandMETA-INF/manifest.xmlconfirm what kind of document it is. -
Detect the kind
ODT, ODS, or ODP is read from the package mimetype first, then from the body element as a fallback.
-
Parse and match
content.xml,styles.xml, andmeta.xmlare walked by element local name, so prefix choice never changes the result. -
Report
Rules produce issues with a code, severity, WCAG mapping, and location, emitted as text, JSON, or SARIF 2.1.0.