attest_flutter 1.0.0
attest_flutter: ^1.0.0 copied to clipboard
Flutter widget-test integration for attest: a WidgetTester accessibility audit, raster and text-scale collectors, and gate matchers for CI.
Changelog #
All notable changes to this package are documented here. The format follows Keep a Changelog and this project adheres to Semantic Versioning.
1.0.0 - 2026-07-02 #
First stable release. Requires attest 1.0.0.
Added #
- The snapshot builder captures the developer-assigned
SemanticsProperties.identifier, and the raster collector attaches the nearest semantics identifier to each contrast sample, so findings can be anchored to an authored, stable id. - Reference validation of the measurement paths: the contrast pipeline is checked end to end against a table of known colour pairs (within 0.1 of independently computed WCAG ratios), gradient and disabled-control abstention are pinned by test, and the overflow fixture is proven to fit at text scale 1.0 and overflow at 2.0.
Changed #
- The public API is frozen for 1.0:
auditAccessibility, the gate matchers and the re-exported core are stable within a major. The plumbing classes (SemanticsSnapshotBuilder,RasterCollector,TextScaleCollector) are annotated@experimental— ordinary tests never need them directly, and their signatures may still evolve forintegration_testsupport. - Stated the version-support policy: Flutter ≥ 3.32 is a hard floor (the
tri-state
flagsCollectionsemantics API), with the current and previous three stable Flutter releases supported and each new stable tracked within one release cycle.
0.8.3 #
Fixed #
- Report the correct tool version.
attestVersionwas stuck at0.1.0, so the report metadata and SARIFtool.driver.versionwere wrong; it is now kept in sync with the package version by a test.
0.8.2 #
Fixed #
- Correct the SDK constraint: the package uses the
SemanticsData.flagsCollectiontri-state API, so it requires Flutter >= 3.32.0 (Dart >= 3.8.0). The previous>= 3.27.0bound was inaccurate and would fail to compile on 3.27–3.31.
0.8.1 #
Changed #
- Source locations now prefer the user's own code: the resolver walks up from the creating element and returns the first location outside the Flutter SDK and pub packages, so a finding on a wrapped Material control points at where the developer used it rather than at framework internals.
0.8.0 #
Changed #
- The audited standard pack comes from
RuleConfig.standardand is recorded in the report metadata. Requiresattest0.8.0.
0.7.0 #
Added #
auditAccessibilityattaches a screen-reader transcript to the report by default (opt out withtranscript: false). Requiresattest0.7.0.
0.6.0 #
Added #
- The snapshot builder now records each text node's font size and weight (from the render tree), which the heading-structure rule reads.
Fixed #
- Children are captured in the real traversal order (sort keys + geometry) via
debugListChildrenInOrder, not the raw child order, so the focus-order rule no longer false-positives on a standardScaffoldapp bar.
0.5.0 #
Added #
- Findings now carry a source location. The snapshot builder recovers each
node's originating widget location from the render tree's debug creator (via a
new
renderRootargument), so a failure points atfile:line. Best-effort: it relies on--track-widget-creation(on by default underflutter test).
0.4.0 #
Added #
RasterCollectorand thecontrastflag onauditAccessibility: the screen is rasterized and each text node's contrast against its real background is measured for the contrast rule. Requiresattest0.4.0.
0.3.0 #
Added #
TextScaleCollectorand thetextScalesparameter onauditAccessibility: the screen is re-pumped at enlarged text sizes and layout overflow is captured into the snapshot for the text-overflow rule. Requiresattest0.3.0.
0.2.0 #
Changed #
- The snapshot builder now resolves node bounds to logical pixels (dividing the
accumulated physical rect by the view's device pixel ratio), so the geometry
rules see real sizes. Requires
attest0.2.0.
0.1.0 #
Added #
SemanticsSnapshotBuilder, which converts a live Flutter semantics tree into the pure-DartSemanticsSnapshot(mapping the 3.xflagsCollectionAPI).WidgetTester.auditAccessibility(), the one-call audit entry point (tree rules only).- The gate matchers
passesAccessibilityGate(),hasNoAccessibilityViolations()andhasNoViolationsForCriterion(), with grouped, criterion-tagged failure output.