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

Nine rule codes across language, metadata, media, structure, and references. “Applies to” shows where each check runs.
Code Severity WCAG Applies to Check
ODF-000errorallPackage is unreadable, empty, not a zip, malformed, or missing content.xml (fatal; the CLI exits 2)
ODF-LANG-001error3.1.1allNo document language (dc:language or xml:lang / fo:language)
ODF-TITLE-002errorallNo non-empty dc:title in meta.xml
ODF-ALT-003error1.1.1allImage or embedded-object frame without svg:title or svg:desc
ODF-HEAD-004warning1.3.1ODTHeading outline levels skip a level
ODF-HEAD-005warning1.3.1ODTBody text but no headings
ODF-TBL-006error1.3.1ODTTable with rows but no table:table-header-rows
ODF-LINK-007warning2.4.4allLink whose text is a raw URL
ODF-IMG-008info1.1.1allImage 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.

  1. Open the package

    fflate unzips the ODF container; mimetype and META-INF/manifest.xml confirm what kind of document it is.

  2. Detect the kind

    ODT, ODS, or ODP is read from the package mimetype first, then from the body element as a fallback.

  3. Parse and match

    content.xml, styles.xml, and meta.xml are walked by element local name, so prefix choice never changes the result.

  4. Report

    Rules produce issues with a code, severity, WCAG mapping, and location, emitted as text, JSON, or SARIF 2.1.0.