Static Mode
Static mode analyses your Flutter source code directly — no device, emulator, or running app needed. It is the fastest way to catch accessibility issues early, and the right starting point before running a full runtime audit.
Running
conalyz static
Or pass --dir without a mode — it defaults to static:
conalyz --dir . # analyse the current project
conalyz --dir ./my-app # analyse a project in another directory
Use --platform to target web instead of mobile (default):
conalyz static --platform web
conalyz static --platform mobile # default — same as omitting the flag
What it checks
Static mode reads the widget tree from your source code and reports:
- Missing semantic labels — buttons, links, images, and icon buttons with no accessible name
- Missing tooltips —
IconButtonwidgets without atooltip - Inaccessible gesture detectors —
GestureDetectorand custom tap handlers with noSemanticswrapper - Missing form field labels —
TextFieldandTextFormFieldwithout alabelTextorsemanticsLabel - Vague labels — button text like "Click here", "Read more", or "Submit" that is meaningless without surrounding context
- Known contrast issues — hardcoded colour pairs that are known to fail the WCAG AA 4.5:1 ratio
What it cannot check
Some checks require the app to be running:
| Check | Why it needs runtime |
|---|---|
| Touch target size | Actual rendered size depends on layout — not calculable from source alone |
| Colour contrast | Themes, dynamic colours, and image backgrounds are only resolved at runtime |
| Focus traversal | The focus tree is only generated when the app runs |
| Slider values | Values are runtime state |
| Disabled element hints | hasEnabledState flags come from the live Semantics tree |
For these checks, use Manual mode, Automated mode, or Capture mode.
Output
Static mode writes the same HTML and JSON reports as the runtime modes:
conalyz_report.html — visual report, opens in any browser
conalyz_report.json — structured data for CI integration
Use --output to write reports to a specific directory:
conalyz static --output ./reports
Using with CI
Static mode runs in seconds with no device attached — it fits naturally into a pull request check:
# GitHub Actions example
- name: Run Conalyz static analysis
run: |
conalyz static --dir . --output ./conalyz_report
Exit code is 0 when no critical issues are found, 1 when critical issues are detected — so the CI step fails automatically on critical violations.
Relationship to runtime modes
Static and runtime analysis complement each other. A good workflow is:
- Run
conalyz staticon every pull request to catch obvious issues early. - Run
conalyz autoon a device before each release to catch runtime-only issues — contrast ratios after theme application, actual touch target sizes, focus traversal order.
The reports from both modes use the same format and severity levels, so results are easy to compare.