---
title: "glance: An accessibility testing engine with axe-core 4.14.1's interface, whose rules run in Rust compiled to WebAssembly."
description: "An accessibility engine with the axe-core 4.14.1 interface; rules run in Rust compiled to WebAssembly."
canonical: "https://glance.avarok.net/"
lastmod: "2026-12-02T02:17:09Z"
tokens: 4840
---

v0.1.0 on npmMIT OR Apache-2.0

# A drop-in replacement for axe-core, with its rules in Rust and WebAssembly.

An accessibility testing engine with the window.axe interface of axe-core 4.14.1: the same calls, options and results object. One walk of the page feeds a Rust core compiled to WebAssembly. MIT OR Apache-2.0.

[Get started](https://glance.avarok.net/#quick-start)[Compatibility](https://glance.avarok.net/docs/compat/)

Install

`$ npm i @avarok/glance`

```
// migrating is one line
- const { source } = require('axe-core');
+ const { source } = require('@avarok/glance');

await page.addScriptTag({ content: source });
const results = await page.evaluate(() => axe.run());
```

1.4–3.0×

faster than axe-core, same rules (exact mode)

across 5 recorded pages, from a small app to Wikipedia

1.5–3.3×

faster in fast mode (may report incomplete)

across 5 recorded pages, fast mode against axe-core

4.14.1

axe-core interface

window.axe, same options, same results object

## Run both engines in your browser

Audit two sample pages with axe-core 4.14.1 and with glance, on this device, one engine at a time, with the same 71 rules, and compare the results and the timings. Nothing is downloaded until you press the button (3,266 kB in all).

Compare live

axe-core 4.14.1 is © Deque Systems, Inc., licensed under the [Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/2.0/), and served here unmodified from its npm package ([source](https://github.com/dequelabs/axe-core/tree/v4.14.1)).

Benchmarks

## A separate measurement: warm axe.run in an iframe, large documentation page, Chromium

Not the headline numbers above: median of 63 warm runs per engine on an Apple M3 Max in Chromium 159.0.8154.6, same rules, each engine in its own iframe, one at a time, as the live demo runs them. Raw data is committed; the chart is generated from it.

- glance 0.1.0204.4
- axe-core 4.14.1397.5

milliseconds per run, lower is better[bench/browser/results/chromium.jsonl](https://github.com/Avarok-Cybersecurity/glance/blob/HEAD/bench/browser/results/chromium.jsonl)

@avarok/glance 0.1.0 · README updated 2026-12-01

**What it is.** glance checks a web page for accessibility problems against WCAG and WAI-ARIA, with the public interface of axe-core 4.14.1: `axe.run()`, `axe.configure()`, `axe.getRules()`, `runPartial`/`finishRun`, frame messaging, reporters, plugins, and the documented `axe.utils` and `axe.commons` members. Code that calls axe-core gets the same results object back. Underneath, a collector reads the DOM, computed styles and layout in one walk into a compact snapshot, and the rules run over that snapshot in a `no_std` Rust core compiled to `wasm32-unknown-unknown`. The wasm is embedded in one injectable script.

**Status.** Version 0.1.0, not released yet and not yet on npm; build from source (below). glance implements rules today; [docs/COMPAT.md](https://glance.avarok.net/docs/compat/) lists every rule and API member as **same**, **differs**, **planned** or **absent**. A rule glance does not implement is absent, never reported as passing.

## Quick start

From source (needs Node.js 22 and the Rust toolchain in `rust-toolchain.toml`):

```sh
git clone https://github.com/Avarok-Cybersecurity/glance.git
cd glance && npm ci && sh scripts/build-wasm.sh && node scripts/build-js.mjs
```

That writes `dist/glance.min.js` (one script that defines `window.axe`) and `dist/index.cjs` (the package's main export, whose `source` is that script). With Playwright, in an ES module:

```js
import { chromium } from 'playwright';
import glance from '@avarok/glance'; // or './dist/index.cjs' from a checkout

const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://example.com/');
await page.addScriptTag({ content: glance.source });
const results = await page.evaluate(() => axe.run());
console.log(results.violations.map((v) => `${v.id}: ${v.nodes.length}`));
await browser.close();
```

In a page directly: `<script src="glance.min.js"></script>`, then `axe.run().then((results) => …)`.

## Migrating from axe-core

Change where the script comes from; nothing that runs in the page changes.

```diff
- const { source } = require('axe-core');
+ const { source } = require('@avarok/glance');
```

The page still sees `window.axe`, and `axe.run`, `axe.configure` and the rest take the same arguments.

### Differences a migrating user can hit

The full list is in [docs/COMPAT.md](https://glance.avarok.net/docs/compat/).

| Area                       | axe-core 4.14.1                       | glance                                                                                                                                |
| -------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Rules                      | every rule in the package             | implemented; naming an absent rule in `runOnly` or `rules` throws the reference's unknown-rule error; a bare `run()` runs fewer rules |
| Message text               | the reference's wording               | glance's own wording; ids, impacts, tags, targets and result structure match                                                          |
| `results.testEngine`       | `{ name: "axe-core", … }`             | `{ name: "glance", version: <glance version> }`; `axe.version` stays `"4.14.1"`                                                       |
| `configure({ standards })` | supported                             | throws `glance does not support standards overrides yet`                                                                              |
| Custom checks and rules    | JS functions or built-in function ids | JS functions work; a string `evaluate`/`matches` id throws `ReferenceError`                                                           |
| `performanceTimer`         | per-rule timing lines                 | glance's own phases: collect, evaluate, report                                                                                        |
| `preload`                  | preloads assets                       | accepted, no effect (no implemented rule needs it)                                                                                    |

## Fast mode

Fast mode (`axe.run(context, { fast: true })`, a glance option axe-core does not have) may trade exactness for speed: it may miss findings or report them as incomplete, and it never reports a violation that exact mode would not. Without `fast`, or with `fast: false`, a run is in exact mode, the one compared with axe-core 4.14.1. It currently makes 2 trades, listed in [docs/COMPAT-FAST.md](https://glance.avarok.net/docs/compat-fast/).

## Benchmarks

 ![Whole axe.run time per page and configuration, glance against axe-core 4.14.1](https://glance.avarok.net/assets/bench-whole.svg)

`axe.run` time in milliseconds under `common`, the rules both engines implement: median of 5 after a warm-up, a fresh page per sample. Exact mode is the one compared with axe-core and the headline. Fast mode (`{ fast: true }`, [docs/COMPAT-FAST.md](https://glance.avarok.net/docs/compat-fast/)) may report findings as incomplete instead, so it is its own column. Every configuration is in [bench/results/whole.md](https://github.com/Avarok-Cybersecurity/glance/blob/HEAD/bench/results/whole.md).

Apple M3 Max (Mac15,8, 16 cores), Chromium 159.0.8154.6, Node v22.23.2; glance 0.1.0+1b553a2, axe-core 4.14.1.

| page           | elements | axe-core | glance | speed-up | glance fast mode | fast speed-up |
| -------------- | -------- | -------- | ------ | -------- | ---------------- | ------------- |
| wiki-ww2       | 16918    | 1761     | 581    | 3.03×    | 534              | 3.30×         |
| whatwg-parsing | 15024    | 1525     | 578    | 2.64×    | 525              | 2.91×         |
| mdn-elements   | 2481     | 281      | 122    | 2.29×    | 109              | 2.57×         |
| app-small      | 293      | 57.2     | 40.3   | 1.42×    | 39.1             | 1.46×         |
| stress         | 15263    | 1457     | 581    | 2.51×    | 536              | 2.72×         |

The method is in [docs/design/07-bench.md](https://glance.avarok.net/docs/design/07-bench/). The black-box profile that motivated the design, which measured only the reference, is in [docs/design/06-reference-profile.md](https://glance.avarok.net/docs/design/06-reference-profile/).

### How it compares

| Aspect    | glance                                                                                                           | axe-core 4.14.1                       |
| --------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| API       | `window.axe`, as axe-core 4.14.1                                                                                 | `window.axe`                          |
| Rules     | ([COMPAT.md](https://glance.avarok.net/docs/compat/))                                                            | the full set                          |
| Licence   | MIT OR Apache-2.0                                                                                                | MPL-2.0                               |
| Mechanism | one page walk into a snapshot; rules in Rust → wasm                                                              | rules in JavaScript over the live DOM |
| Speed     | `axe.run` 1.4–3.0× faster under the same rules, exact mode ([Benchmarks](https://glance.avarok.net/#benchmarks)) | the baseline                          |

## Compatibility

- **Browsers**: Chromium, tested in CI through Playwright 1.65.1. Others untested.
- **Node.js**: 22 for the package's main export and the build scripts.
- **Building**: Rust 1.100.0 (`rust-toolchain.toml`) with the `wasm32-unknown-unknown` target. Nothing Rust-related is needed at runtime.
- **Interface level**: axe-core 4.14.1. Every member and rule, with its status: [docs/COMPAT.md](https://glance.avarok.net/docs/compat/).

## Questions people ask

### What is glance?

An accessibility testing engine for web pages with the same JavaScript API as axe-core 4.14.1, whose rules run in Rust compiled to WebAssembly.

### Is glance a drop-in replacement for axe-core?

Not in every case yet. For axe-core 4.14.1 and the rules glance implements, load glance's script instead of axe-core's and the same calls return the same results object, apart from the differences [docs/COMPAT.md](https://glance.avarok.net/docs/compat/) lists with what is implemented.

### Is glance faster than axe-core?

On the 5 recorded pages measured, glance's `axe.run` ran 1.4–3.0× faster than axe-core's under the rules both implement, in exact mode. See [Benchmarks](https://glance.avarok.net/#benchmarks).

### How do I migrate from axe-core?

Inject glance's `source` where you injected axe-core's. See [Migrating from axe-core](https://glance.avarok.net/#migrating-from-axe-core).

### Does it work with tools that inject axe-core for me?

Anything that injects a script defining `window.axe` and then calls it can use glance's `source`, if the tool lets you supply the script. glance's own tests drive Playwright directly.

### Can I use it in a commercial or closed-source project?

Yes. glance is MIT OR Apache-2.0, at your option.

### Is glance based on axe-core's code?

No. It is an independent, clean-room implementation written from a specification of the public interface, W3C standards and black-box behaviour. See [NOTICE](https://github.com/Avarok-Cybersecurity/glance/blob/HEAD/NOTICE) and [docs/spec/SOURCES.md](https://github.com/Avarok-Cybersecurity/glance/blob/HEAD/docs/spec/SOURCES.md).

### Is glance affiliated with axe-core's authors?

No. The name axe-core is used only to say which interface glance is compatible with.

## Contributing and security

See [CONTRIBUTING.md](https://github.com/Avarok-Cybersecurity/glance/blob/HEAD/CONTRIBUTING.md); it includes the clean-room rule: contributions must not use axe-core source. Report vulnerabilities privately as described in [SECURITY.md](https://github.com/Avarok-Cybersecurity/glance/blob/HEAD/SECURITY.md). Everyone taking part follows the [Code of Conduct](https://github.com/Avarok-Cybersecurity/glance/blob/HEAD/CODE_OF_CONDUCT.md). Changes are recorded in [CHANGELOG.md](https://github.com/Avarok-Cybersecurity/glance/blob/HEAD/CHANGELOG.md).

## License

Licensed under either of

- Apache License, Version 2.0 ([LICENSE-APACHE](https://github.com/Avarok-Cybersecurity/glance/blob/HEAD/LICENSE-APACHE)), or
- MIT license ([LICENSE-MIT](https://github.com/Avarok-Cybersecurity/glance/blob/HEAD/LICENSE-MIT))

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

## How it works

1. A collector in the page walks the flattened tree once (light DOM, open shadow roots, slots) and writes structure, interned attributes, computed styles and layout into flat columns.
2. The Rust core (`crates/glance-a11y`, `no_std` + `alloc`) runs every selected rule over that snapshot. Shared facts (roles, accessible names, focus, visibility, language) are computed once and memoised; anything not in the snapshot is read lazily through one `Host` trait.
3. The API layer turns raw results into the axe-compatible results object, applies custom rules and checks, and runs the reporter.

Rule metadata and messages live in one file, `rules.json`. Details: [docs/DESIGN.md](https://glance.avarok.net/docs/design/).

## What this does not prove

- **The speed numbers are from 5 recorded pages on one machine,** replayed from recordings with the network blocked (Apple M3 Max (Mac15,8, 16 cores), Chromium 159.0.8154.6, Node v22.23.2). Other pages, machines and browsers will differ.

- **The differential corpus is glance's own.** Its pages were written from the specification and run under both engines; it is not the reference's test suite. Agreement means every case in `conformance/cases/` gives the same results object, except the known differences COMPAT.md lists rule by rule, not that every page will.
- **Not every rule exists yet.** Results from a bare `run()` contain fewer rules than the reference's; COMPAT.md says which.
- **Chromium only.** CI runs Chromium through Playwright. Firefox and WebKit are untested.
- **W3C ACT test cases** run under both engines in CI; where the reference departs from the ACT expectation, glance follows the reference ([docs/COMPAT-ACT.md](https://glance.avarok.net/docs/compat-act/)).
- **Automated checks find a subset of accessibility problems.** That is as true of glance as of the reference; neither replaces testing with people and assistive technology.

## axe-core and glance, live

Close

Measured on your device, one engine at a time, same page, same 71 rules. Each engine runs in its own iframe holding a fresh copy of the page.

Sample page

 Small app page Large documentation page 

### axe-core 4.14.1

Download + start-up

—

First run

—

Warm run, median

—

Violations · passes · incomplete

—

Script size

—

### glance 0.1.0

Download + start-up

—

First run

—

Warm run, median

—

Violations · passes · incomplete

—

Script size

—

Run again

axe-core 4.14.1 is © Deque Systems, Inc., licensed under the [Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/2.0/), and served here unmodified from its npm package ([source](https://github.com/dequelabs/axe-core/tree/v4.14.1)).

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@id": "https://thomaspbraun.com/#person",
      "@type": "Person",
      "name": "Thomas Braun",
      "sameAs": [
        "https://github.com/tbraun96",
        "https://x.com/tbraun96"
      ],
      "url": "https://thomaspbraun.com",
      "worksFor": {
        "@id": "https://avarok.net/#organization"
      }
    },
    {
      "@id": "https://avarok.net/#organization",
      "@type": "Organization",
      "name": "Avarok",
      "url": "https://avarok.net"
    },
    {
      "@id": "https://glance.avarok.net/#website",
      "@type": "WebSite",
      "inLanguage": "en",
      "name": "glance",
      "publisher": {
        "@id": "https://thomaspbraun.com/#person"
      },
      "url": "https://glance.avarok.net/"
    },
    {
      "@id": "https://glance.avarok.net/",
      "@type": "WebPage",
      "about": {
        "@id": "https://glance.avarok.net/#software"
      },
      "author": {
        "@id": "https://thomaspbraun.com/#person"
      },
      "dateModified": "2026-12-01",
      "description": "An accessibility engine with the axe-core 4.14.1 interface; rules run in Rust compiled to WebAssembly.",
      "inLanguage": "en",
      "isPartOf": {
        "@id": "https://glance.avarok.net/#website"
      },
      "name": "glance",
      "url": "https://glance.avarok.net/"
    },
    {
      "@id": "https://glance.avarok.net/#source",
      "@type": "SoftwareSourceCode",
      "author": {
        "@id": "https://thomaspbraun.com/#person"
      },
      "codeRepository": "https://github.com/Avarok-Cybersecurity/glance",
      "description": "An accessibility engine with the axe-core 4.14.1 interface; rules run in Rust compiled to WebAssembly.",
      "keywords": "accessibility, a11y, axe-core, wcag, wai-aria, accessibility-testing, playwright, webassembly, wasm, rust",
      "license": [
        "https://opensource.org/licenses/MIT",
        "https://www.apache.org/licenses/LICENSE-2.0"
      ],
      "maintainer": {
        "@id": "https://thomaspbraun.com/#person"
      },
      "name": "@avarok/glance",
      "programmingLanguage": [
        "TypeScript",
        "JavaScript",
        "Rust",
        "WebAssembly"
      ],
      "runtimePlatform": "Node.js &gt;=22",
      "sourceOrganization": {
        "@id": "https://avarok.net/#organization"
      },
      "targetProduct": {
        "@id": "https://glance.avarok.net/#software"
      },
      "version": "0.1.0"
    },
    {
      "@id": "https://glance.avarok.net/#software",
      "@type": "SoftwareApplication",
      "alternateName": "glance",
      "applicationCategory": "DeveloperApplication",
      "applicationSubCategory": "Accessibility testing engine",
      "author": {
        "@id": "https://thomaspbraun.com/#person"
      },
      "description": "An accessibility engine with the axe-core 4.14.1 interface; rules run in Rust compiled to WebAssembly.",
      "downloadUrl": "https://www.npmjs.com/package/@avarok/glance",
      "isAccessibleForFree": true,
      "license": [
        "https://opensource.org/licenses/MIT",
        "https://www.apache.org/licenses/LICENSE-2.0"
      ],
      "name": "@avarok/glance",
      "offers": {
        "@type": "Offer",
        "price": "0",
        "priceCurrency": "USD"
      },
      "operatingSystem": "Node.js &gt;=22",
      "publisher": {
        "@id": "https://avarok.net/#organization"
      },
      "softwareVersion": "0.1.0",
      "url": "https://glance.avarok.net/"
    }
  ]
}
```
