Table of Contents

Class DocumentChange

Namespace
PDiffy
Assembly
PDiffy.dll

One difference between two documents or snapshots. Path locates it, such as "structure > Document > Table > TR[2] > TD[1]", or "line 12" in text without PDiffy's sections; Detail says what changed. SectionName names the section it's in, and PdfSection or DocxSection gives that section as an enum.

public sealed record DocumentChange : IEquatable<DocumentChange>
Inheritance
DocumentChange
Implements
Inherited Members

Properties

AffectsAccessibility

Whether the change can affect what assistive technology gets, by the rules the README lists under "Changes that affect accessibility", such as a heading that became a paragraph or a figure that lost its alt text. Null when the change isn't assessed: every change in a text snapshot.

public bool? AffectsAccessibility { get; }

Property Value

bool?

Detail

What changed, such as type: H2 -> H3, alt: "Trail map" -> (missing) or reading position 3 -> 5 and parent: Document > P -> Document for a move; for a line added or removed, the line itself. It can run over several lines.

public required string Detail { get; init; }

Property Value

string

DocxSection

The section of a Word snapshot the change is in; null for a PDF or text snapshot, and for a change in "header" or "whitespace".

public DocxSection? DocxSection { get; }

Property Value

DocxSection?

Kind

What kind of difference it is.

public required ChangeKind Kind { get; init; }

Property Value

ChangeKind

NeedsReview

Whether the change needs an accessibility specialist to look at it even though it doesn't affect accessibility, by the rules the README lists under "Changes for review", such as reworded alt text, a new figure or table, or a heading whose text changed. A specialist can then review only what changed since the last audit. False when the change affects accessibility, and null when it isn't assessed: every change in a text snapshot.

public bool? NeedsReview { get; }

Property Value

bool?

Page

The page the changed line is on, counted from 1, as its first "p3" word says (the later snapshot's, for a line both have); null when the line names no page. For pages inserted or removed, the first such page.

public required int? Page { get; init; }

Property Value

int?

Path

Where the change is, such as "structure > Document > Table > TR[2] > TD[1]" or "line 12"; "header" for the snapshot's first lines, "pages" for pages inserted or removed, and "whitespace" when only blank lines or line endings differ. For a new or fixed problem in the checks section, the rule, such as "FigureAltText", with the finding's own path as the Detail.

public required string Path { get; init; }

Property Value

string

PdfSection

The section of a PDF snapshot the change is in; null for a Word or text snapshot, and for a change in "header" or "whitespace".

public PdfSection? PdfSection { get; }

Property Value

PdfSection?

SectionName

The section the change is in, as the snapshot names it, such as "structure" or "body"; "header" for the snapshot's first lines (format version and options), "whitespace" when only blank lines or line endings differ, and null for every change in text without sections. The JSON output's "section" holds the same string.

public required string? SectionName { get; init; }

Property Value

string

WcagCriteria

The WCAG 2.2 success criteria the change could affect, such as "1.1.1" for alt text taken away, so whoever keeps an accessibility conformance report knows which rows to look at again. They say what could be affected, not that a criterion fails. Empty when the change doesn't affect accessibility, when it does but no criterion clearly covers it (as for a new PDF version finding), and for every change in a text snapshot.

public IReadOnlyList<string> WcagCriteria { get; }

Property Value

IReadOnlyList<string>