Skip to content

feat: add includeIncomplete=false option to exclude axe-core incomplete results#808

Open
alexander-turner wants to merge 1 commit into
pa11y:mainfrom
alexander-turner:feature/include-incomplete-option
Open

feat: add includeIncomplete=false option to exclude axe-core incomplete results#808
alexander-turner wants to merge 1 commit into
pa11y:mainfrom
alexander-turner:feature/include-incomplete-option

Conversation

@alexander-turner

@alexander-turner alexander-turner commented Apr 1, 2026

Copy link
Copy Markdown

Summary

Add a boolean includeIncomplete option (default true) that cleanly excludes axe-core's "incomplete" (needs-review) results without affecting violation reporting.

Motivation

#707 requested filtering out incomplete results and was closed as resolved by #685 (levelCapWhenNeedsReview). The workaround caps incomplete items to a lower severity and then excludes that level:

{
  "levelCapWhenNeedsReview": "warning",
  "includeWarnings": false
}

This has a real trade-off: it also suppresses genuine violation warnings. For example, heading-order (skipped heading levels like h1 → h3) reports moderate impact, which pa11y maps to warning. The workaround silently drops it along with the incomplete items.

includeIncomplete: false solves this precisely — it excludes only incomplete results while preserving all violation severities.

The false-positive problem

On pages with rich content (math symbols, pseudo-elements, SVG foreignObject, overlapping backgrounds), axe-core's incomplete results produce hundreds of non-actionable items (e.g. nonBmp, bgOverlap, pseudoContent, shortTextContent). These aren't violations — axe just can't confirm them programmatically.

Relates to #707, #442, #623, #633, #697, and pa11y/pa11y-ci#124.

…ults

Axe-core's "incomplete" results are items it couldn't automatically verify,
not actual accessibility violations. On pages with rich content (math symbols,
pseudo-elements, SVG foreignObject, overlapping backgrounds), these produce
hundreds of false positives with no CSS fix since the contrast ratios are
correct — axe just can't confirm them programmatically.

This adds a boolean `includeIncomplete` option (default `true` for backward
compatibility). When set to `false`, the axe runner only returns
`result.violations`, excluding `result.incomplete`.

- Available via JS API (`includeIncomplete: false`) and CLI (`--no-include-incomplete`)
- Default `true` preserves existing behavior (non-breaking change)
- Includes unit tests for all three states (true, false, unset)
- Updates README documentation

Relates to pa11y#442 and pa11y/pa11y-ci#124
@alexander-turner alexander-turner changed the title feat: add includeIncomplete option to exclude axe-core incomplete results feat: add includeIncomplete=false option to exclude axe-core incomplete results Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants