attest library
Pure-Dart core of attest: the accessibility rule engine, data model, reporting and baseline logic.
This library depends on nothing Flutter — every rule is a pure function over
a serializable SemanticsSnapshot, so rules are unit-testable without a
widget tester. Flutter-specific collection lives in attest_flutter.
This barrel is the only supported entry point. Nothing under src/ is
exported directly; import only package:attest/attest.dart.
Classes
- AmbiguousNameRule
- Flags interactive elements on a screen that share an identical accessible name.
- AuditMeta
- Context describing how and when an AuditReport was produced.
- AuditReport
- The result of auditing one screen: the findings plus the meta describing the run.
- Baseline
- A set of accepted finding fingerprints — the record of what a project has already reviewed, against which new runs are diffed.
- BaselineGate
- Diffs a run's findings against a Baseline by fingerprint.
- ConformanceEntry
- One clause of a ConformanceReport: its coverage plus the findings on it.
- ConformanceReport
- A machine-readable conformance document for one standard pack.
- ContrastRule
- Flags text whose contrast against its background is below the WCAG minimum.
- ContrastSample
- One measured text-versus-background contrast observation.
- CoverageMatrix
- The coverage matrix for one standard pack: every success criterion in scope, classified as automated, partial or manual.
- Criteria
- The standard criteria the bundled rules cite.
- Criterion
- The standard clause a Finding is bound to.
- CriterionCoverage
- One row of the coverage matrix: a success criterion, how far attest covers it, the rule(s) that do so, and a short human-facing note.
- FieldLabelRule
- Flags form controls — text fields, checkboxes, switches, radios — that have no programmatic label.
- Finding
- A single accessibility violation reported by a rule.
- Fingerprinter
- Computes the stable fingerprint that identifies a finding across runs.
- FocusOrderRule
- Flags an illogical focus order: an element reached later in traversal that sits entirely above the element reached just before it.
- FocusTrapRule
- Flags interactive elements that are reachable by touch but hidden from assistive technology.
- GateResult
- The outcome of diffing a run's findings against a Baseline.
- HeadingStructureRule
- Flags text that looks like a heading but is not exposed as one.
- ImageAltRule
- Flags images that are visible to assistive technology but carry no text alternative.
- InteractiveNameRule
- Flags interactive elements that expose no accessible name.
- NonTextContrastRule
- Flags icons and other non-text glyphs whose contrast against their background is below the WCAG 1.4.11 minimum of 3:1.
- PlaceholderNameRule
- Flags meaningful elements whose accessible name is a generic placeholder.
- RectData
-
An axis-aligned rectangle in global logical pixels, mirrored from
Flutter's
Rectso the core stays free of any Flutter dependency. - Rule
- A single accessibility check.
- RuleConfig
- Tunable inputs the rules read while evaluating a snapshot.
- RuleContext
- The shared state a rule reads while evaluating: the config and the precomputed index, plus helpers for building findings.
- RuleEngine
- Runs a set of Rules over a SemanticsSnapshot and assembles an AuditReport.
- SarifWriter
- Serializes audit reports to SARIF 2.1.0, the format GitHub and GitLab render as inline annotations on a pull request.
- SemanticsNodeData
- One node of a serializable, Flutter-free snapshot of a screen's semantics tree.
- SemanticsSnapshot
- A serializable, Flutter-free snapshot of one screen's semantics tree plus the observations the Flutter collectors gather.
- SnapshotIndex
- Precomputed lookups over a SemanticsSnapshot that rules and the engine share.
- SourceLocation
- A location in source code, used to anchor a Finding to the widget that produced it.
- StateExposedRule
- Flags a group of custom tappable controls that expose no selected state.
- TargetSizeRule
- Flags touch targets smaller than the configured minimum.
- TextOverflowRule
- Flags screens whose layout overflows when the system text size is enlarged.
- TextScaleObservation
- The result of re-pumping a screen under an enlarged text scale.
- TextStyleData
-
The subset of a text node's visual style the rules need, mirrored from
Flutter's
TextStyleso the core stays free of any Flutter dependency. - TranscriptGenerator
- Produces the screen-reader transcript for a snapshot: the sequence of announcements TalkBack or VoiceOver would make, in traversal order.
- WcagRegistry
- The single source of truth mapping WCAG Level A and AA success criteria to how far attest covers each one.
Enums
- Confidence
- How much trust to place in a Finding.
- CoverageStatus
- How much of a success criterion attest can verify automatically.
- SemanticsActionData
-
An action a node can perform, mirrored from Flutter's
SemanticsActionso the core can reason about interactivity without any Flutter dependency. - SemanticsFlagData
-
A boolean semantic property of a node, mirrored from Flutter's
SemanticsFlagso the core can reason about roles and states without any Flutter dependency. - Severity
- How serious an accessibility Finding is.
- Standard
- A versioned pack of success criteria the audit runs against.
- TargetSizeMode
- How the target-size rule chooses its minimum acceptable touch-target size.
- TextDirectionData
-
The reading direction of a piece of text or a layout, mirrored from Flutter's
TextDirectionso the core stays free of any Flutter dependency.