Reference
FAQ
Scope, limits, and where iconlens fits next to the tools you already use.
Questions
Does it need a browser or a network?
No. iconlens parses files locally, with no network code, uploads, or telemetry. It runs the same on a laptop, in a container, or in air-gapped CI.
How is the accessible name computed?
Per SVG-AAM priority: aria-labelledby first, then aria-label, then the first child <title>. The first source that yields a non-empty name wins; the rest are ignored.
Can it check inline SVG in HTML or JSX?
No. iconlens targets standalone .svg assets on disk. Inline SVG in markup is out of scope; use an HTML or JSX linter for that.
Does it replace axe-core or Pa11y?
No. It complements them. Browser engines test a rendered DOM; iconlens tests the asset before it reaches the DOM, which is the gap they cannot cover.
How do I fail CI on warnings too?
Run iconlens icons/*.svg --fail-on warning. It affects only the exit code; every issue is still reported and included in SARIF output.
What do the exit codes mean?
1 on any error-severity issue, 0 otherwise, and 2 on bad usage such as no arguments.
Limitations
Static analysis
iconlens is static file analysis. It does not render the graphic, so it cannot compute colour contrast. Name computation follows the SVG-AAM priority order but does not implement every edge of the full specification. Inline SVG in HTML or JSX is out of scope.
How it compares
<title> and <desc> by default, so its default preset strips the accessible name out of the asset. github.com/svg/svgonoSvgWithoutTitle.svg file on its own. biomejs.dev