Compatibility with axe-core 4.14.1

@avarok/glance@0.1.0Updated 14 min readView as markdown

glance matches the public interface of axe-core 4.14.1 as specified in docs/spec/. This page lists every public function and every rule, and says whether glance behaves the same or how it differs. "Same" means the differential suite compares the results object field by field and finds no difference, apart from the human-readable strings, which glance writes in its own words.

Status markers: same; differs (how is stated); planned (in the MVP, not built yet); absent (not implemented; using it throws, never silently passes).

Functions and properties

Member Status Notes
axe.run(context?, options?, callback?) same all call forms, argument errors, concurrency error and callback timing (vitest; differential suite for results). Frames are tested in messaging mode when the engine is loaded in them: same- and cross-origin, nested, fromFrames, excluded and hidden frames (differential frames/). The setup() tree is discarded when a run ends
axe.configure(spec) same branding, reporter, checks (enabled, options; options replace), rules (enabled, impact, tags, reviewOnFail, metadata, any/all/none), disableOtherRules, axeVersion/ver, noHtml, allowedOrigins, locale (rule description/help, check messages and failureSummaries, merged over glance's own wording by id). locale differs in one point: a locale naming a rule or check glance does not know throws Locale provided for unknown rule: "<id>" (or check)
axe.configure({ standards }) differs throws glance does not support standards overrides yet; listed so its absence is explicit
axe.configure custom checks/rules with JS evaluate/matches/after same evaluated in the API layer after the core pass and merged in registry order (built-ins, then custom rules in the order added); this.data, this.relatedNodes, this.async; a throwing evaluate/matches gives the rule error and an error-occurred node. A built-in rule whose check list changes or names a JS check runs its core checks raw and its JS checks here. differs: a string evaluate/matches (a built-in function id) throws ReferenceError since glance's functions are compiled; overriding selector, matches, excludeHidden or pageLevel of a built-in rule, per-rule check options on a built-in rule, and check matches throw glance does not support … yet; after steps of built-in checks across frames are not run (no implemented rule has one)
axe.reset() same
axe.resetLocale() same restores glance's own messages
axe.getRules(tags?) same returns only rules glance implements
axe.setup(node?), axe.teardown() same returns the root virtual node; a second setup throws the documented message; axe._tree holds the tree until teardown or the end of a run
axe.runPartial, axe.finishRun same partial results in the documented shape ({ results: [{ id, result: 'inapplicable', pageLevel, impact: null, nodes: [{ any, all, none, node }] }], frames, environmentData }, checks { id, data, result?, relatedNodes }); differential suite runs every case through a runPartial-per-frame / finishRun-in-a-blank-page driver. With elementRef, finishRun gives top-window nodes element: null. Impacts and reviewOnFail come from the finishing window's configuration
axe.frameMessenger({ open, post }) same default messenger is postMessage with JSON strings, checked against each frame's allowedOrigins; an opaque origin (about:blank, srcdoc) matches no <same_origin> frame, as observed; reset() reinstalls the default
axe.utils.getFrameContexts same frames in context, hidden frames left out; [] with iframes: false
axe.externalAPIs same run and runPartial wait for getElementInternals (timeout Timeout called for elementInternals); when supplied, its role and string ARIA properties are the only internals read, for any element its ancestry names in the window (see ElementInternals below)
axe.addReporter, getReporter, hasReporter; reporters v1, v2, raw, rawEnv, no-passes same v1, v2 and no-passes are in the differential suite
axe.registerPlugin, axe.plugins, axe.cleanup same plugin commands are registered as frame-messenger topics; cleanup runs every instance's cleanup, then each frame's
axe.version differs "4.14.1", the interface level glance matches, so configure({ axeVersion }) checks behave the same; glance's own version is in testEngine
results.testEngine differs { name: "glance", version: <glance version> }
axe.source same the npm export source is dist/glance.min.js: the whole engine as one injectable script, wasm embedded
axe.utils: getElementSource, shadowSelect, shadowSelectAll, getStandards, isContextSpec, isContextObject, isContextProp, isLabelledFramesSelector, isLabelledShadowDomSelector, normalizeRunOptions, uuid, serializeError, RuleError, DqElement, nodeSerializer, querySelectorAll, getRule, getFlattenedTree, getNodeFromTree, queue, sendCommandToFrame, toArray same querySelectorAll (and custom rule selector) supports type, *, #id, .class, attribute selectors (presence, =, ^=, $=, *=), :not(), descendant and child combinators and comma lists over the flattened tree; other syntax throws. differs: getStandards().htmlElms is {} (glance keeps element rules as code); nodeSerializer.update with custom functions throws; getRule lists selector/matches only for custom rules
axe.commons.aria: getRoleType, implicitRole, label same answered by the core's facts (concepts-roles.md, concepts-accessible-name.md) for elements of the setup() tree; getRoleType also takes a role name; label is the aria-labelledby text, else aria-label, else null. Chromium vitest covers the documented examples
axe.commons.dom: getComposedParent, getRootNode same flattened-tree parent; document or open shadow root
axe.commons.dom: isFocusable, isNativelyFocusable same the core's focus facts (concepts-focus-lang.md)
axe.commons.dom.isVisible(el, screenReader?) differs without screenReader it is the core's "visible on screen" notion, so visibility:collapse, closed <details> content and content-visibility:hidden content read as not visible where the reference's legacy test says visible; with screenReader it is rendered and not under aria-hidden (opacity, clipping, position and inert ignored), as documented
axe.commons.dom.getNodeGrid absent its cells are opaque in the reference; no documented use
axe.commons.text.accessibleText same the core's accessible-name computation with inControlContext / inLabelledByContext
undocumented axe.*, axe.utils.*, axe.commons.* members absent not part of the public interface

Options

All run options in spec/options-run.md (runOnly, rules, reporter, resultTypes, selectors, ancestry, xpath, absolutePaths, iframes, elementRef, frameWaitTime, pingWaitTime, preload, performanceTimer) and every context form in spec/options-context.md: same, including frame contexts. performanceTimer prints glance's own phases (collect, evaluate, report), not the reference's per-rule lines. preload is accepted and has no effect: no implemented rule needs preloaded assets.

The differential suite runs every case three times: with runOnly set to the case's rule (or the rules its sidecar names), as a bare run(), and with runOnly through runPartial/finishRun. A bare run executes more rules in the reference than in glance, so in that mode both results objects are first restricted to the rules getRules() lists, and then compared.

Fast mode

Fast mode ({ fast: true }) is a glance option axe-core does not have. What it may trade, the trades it makes and how that is checked are in COMPAT-FAST.md.

Rules

The MVP is the 70 rules tagged wcag2a, wcag2aa, wcag21a, wcag21aa or wcag22aa (spec/00-index.md lists them). All 70 are planned. The other 35 rules are absent: best-practice rules, experimental rules, AAA rules, and deprecated rules without a WCAG A/AA tag. A bare run() therefore runs fewer rules than the reference does. Naming an absent rule in runOnly or rules throws the reference's unknown-rule error.

The table below is generated from rules.json by scripts/gen-rules.mjs (CI checks it is fresh). A rule is same once it agrees 100% with the reference in the differential suite (conformance/differential/); the ACT cases are a further gate still to be wired.

Rule Impact Default Status Notes
area-alt critical yes same differential suite: every case agrees; ACT c487ae: departures in COMPAT-ACT.md
aria-allowed-attr critical yes same differential suite: every case agrees; ACT 5c01ea: departures in COMPAT-ACT.md
aria-braille-equivalent serious yes same differential suite: every case agrees; no ACT rule
aria-command-name serious yes differs differential suite: 6 known differences on 1 case (conformance/differential/known.json, see Known differences); ACT 97a4e1: departures in COMPAT-ACT.md
aria-conditional-attr serious yes same differential suite: every case agrees; ACT 5c01ea: departures in COMPAT-ACT.md
aria-deprecated-role minor yes same differential suite: every case agrees; ACT 674b10: departures in COMPAT-ACT.md
aria-hidden-body critical yes same differential suite: every case agrees; no ACT rule
aria-hidden-focus serious yes same differential suite: every case agrees; ACT 6cfa84: departures in COMPAT-ACT.md
aria-input-field-name serious yes same differential suite: every case agrees; ACT e086e5: departures in COMPAT-ACT.md
aria-meter-name serious yes same differential suite: every case agrees; no ACT rule
aria-progressbar-name serious yes same differential suite: every case agrees; no ACT rule
aria-prohibited-attr serious yes same differential suite: every case agrees; ACT 5c01ea: departures in COMPAT-ACT.md
aria-required-attr critical yes same differential suite: every case agrees; ACT 4e8ab6: departures in COMPAT-ACT.md
aria-required-children critical yes same differential suite: every case agrees; ACT bc4a75, ff89c9: departures in COMPAT-ACT.md
aria-required-parent critical yes same differential suite: every case agrees; ACT ff89c9: departures in COMPAT-ACT.md
aria-roledescription serious no same differential suite: every case agrees; no ACT rule
aria-roles critical yes same differential suite: every case agrees; ACT 674b10: departures in COMPAT-ACT.md
aria-tab-name serious yes same differential suite: every case agrees; no ACT rule
aria-toggle-field-name serious yes same differential suite: every case agrees; ACT e086e5: departures in COMPAT-ACT.md
aria-tooltip-name serious yes same differential suite: every case agrees; no ACT rule
aria-valid-attr-value critical yes same differential suite: every case agrees; ACT 6a7281: departures in COMPAT-ACT.md
aria-valid-attr critical yes same differential suite: every case agrees; ACT 5f99a7: departures in COMPAT-ACT.md
audio-caption critical no same differential suite: every case agrees; ACT 2eb176, afb423: departures in COMPAT-ACT.md
autocomplete-valid serious yes same differential suite: every case agrees; ACT 73f2c2: departures in COMPAT-ACT.md
avoid-inline-spacing serious yes same differential suite: every case agrees; ACT 24afc2, 9e45ec, 78fd32: departures in COMPAT-ACT.md
blink serious yes same differential suite: every case agrees; no ACT rule
button-name critical yes same differential suite: every case agrees; ACT 97a4e1, m6b1q3: departures in COMPAT-ACT.md
bypass serious yes same differential suite: every case agrees; ACT cf77f2, 047fe0, b40fd1, 3e12e1, ye5d6e: departures in COMPAT-ACT.md
color-contrast serious yes differs differential suite: 8 known differences on 2 cases (conformance/differential/known.json, see Known differences); ACT afw4f7, 09o5cg: departures in COMPAT-ACT.md
css-orientation-lock serious no same differential suite: every case agrees; ACT b33eff: departures in COMPAT-ACT.md
definition-list serious yes same differential suite: every case agrees; no ACT rule
dlitem serious yes same differential suite: every case agrees; no ACT rule
document-title serious yes same differential suite: every case agrees; ACT 2779a5: departures in COMPAT-ACT.md
duplicate-id-aria critical yes same differential suite: every case agrees; ACT 3ea0c8: departures in COMPAT-ACT.md
form-field-multiple-labels moderate yes same differential suite: every case agrees; no ACT rule
frame-focusable-content serious yes same differential suite: every case agrees; ACT akn7bn: departures in COMPAT-ACT.md
frame-tested critical yes same differential suite: every case agrees; no ACT rule
frame-title-unique serious yes same differential suite: every case agrees; ACT 4b1c6c: departures in COMPAT-ACT.md
frame-title serious yes same differential suite: every case agrees; ACT cae760: departures in COMPAT-ACT.md
html-has-lang serious yes same differential suite: every case agrees; ACT b5c3f8: departures in COMPAT-ACT.md
html-lang-valid serious yes same differential suite: every case agrees; ACT bf051a: departures in COMPAT-ACT.md
html-xml-lang-mismatch moderate yes same differential suite: every case agrees; ACT 5b7ae0: departures in COMPAT-ACT.md
image-alt critical yes same differential suite: every case agrees; ACT 23a2a8: departures in COMPAT-ACT.md
input-button-name critical yes same differential suite: every case agrees; ACT 97a4e1: departures in COMPAT-ACT.md
input-image-alt critical yes same differential suite: every case agrees; ACT 59796f: departures in COMPAT-ACT.md
label-content-name-mismatch serious yes same differential suite: every case agrees; ACT 2ee8b8: departures in COMPAT-ACT.md
label critical yes same differential suite: every case agrees; ACT e086e5: departures in COMPAT-ACT.md
link-in-text-block serious yes differs differential suite: every case agrees; real pages: 967 nodes on whatwg-parsing, wiki-ww2 (conformance/real-pages/known.json, see COMPAT-REAL-PAGES.md); no ACT rule
link-name serious yes same differential suite: every case agrees; ACT c487ae: departures in COMPAT-ACT.md
list serious yes same differential suite: every case agrees; no ACT rule
listitem serious yes same differential suite: every case agrees; no ACT rule
marquee serious yes same differential suite: every case agrees; no ACT rule
meta-refresh critical yes same differential suite: every case agrees; ACT bc659a, bisz58: departures in COMPAT-ACT.md
meta-viewport moderate yes same differential suite: every case agrees; ACT b4f0c3: departures in COMPAT-ACT.md
nested-interactive serious yes same differential suite: every case agrees; ACT 307n5z: departures in COMPAT-ACT.md
no-autoplay-audio moderate yes same differential suite: every case agrees; ACT 80f0bf: departures in COMPAT-ACT.md
object-alt serious yes same differential suite: every case agrees; ACT 8fc3b6: departures in COMPAT-ACT.md
p-as-heading serious no same differential suite: every case agrees; no ACT rule
role-img-alt serious yes same differential suite: every case agrees; ACT 23a2a8: departures in COMPAT-ACT.md
scrollable-region-focusable serious yes same differential suite: every case agrees; ACT 0ssw9k: departures in COMPAT-ACT.md
select-name critical yes same differential suite: every case agrees; ACT e086e5: departures in COMPAT-ACT.md
server-side-image-map minor yes same differential suite: every case agrees; no ACT rule
summary-name serious yes same differential suite: every case agrees; no ACT rule
svg-img-alt serious yes same differential suite: every case agrees; ACT 7d6734: departures in COMPAT-ACT.md
table-fake-caption serious no same differential suite: every case agrees; no ACT rule
target-size serious no differs differential suite: every case agrees; real pages: 7 nodes on mdn-elements, wiki-ww2 (conformance/real-pages/known.json, see COMPAT-REAL-PAGES.md); no ACT rule
td-has-header critical no same differential suite: every case agrees; no ACT rule
td-headers-attr serious yes same differential suite: every case agrees; ACT a25f45: departures in COMPAT-ACT.md
th-has-data-cells serious yes same differential suite: every case agrees; ACT d0f69e: departures in COMPAT-ACT.md
valid-lang serious yes same differential suite: every case agrees; ACT de46e4: departures in COMPAT-ACT.md
video-caption critical yes same differential suite: every case agrees; ACT eac66b: departures in COMPAT-ACT.md

ACT Rules departures

Cases where the reference itself departs from the ACT Rules expectation are listed in COMPAT-ACT.md, generated by the ACT runner (conformance/act/).

Known differences: color-contrast

These are per-node differences that remain on recorded real pages and two fixture pages, outside the rule's own cases (all of which agree). They are kept in view for a follow-up. The fixture-page rows are also listed in conformance/differential/known.json, so the differential allows them. If one starts to agree, the differential fails until it is removed from there.

Where Node Reference glance
facts/visibility.html (default mode) text in an overflow: auto box, below its fold, not yet scrolled to ("scrolled below") bgOverlap elmPartiallyObscured
html-has-lang/20-xml-math-root.html (default mode) Chrome's XML viewer for a document served as application/xml (any visible element with letters or digits) the rule throws in #matches (document.createElement(...).getContext is not a function): in an application/xml document createElement makes a no-namespace element, so there is no canvas for icon-ligature detection; one error-occurred node, rule error evaluates every node (no ligature detection, so no canvas); parity needs the document's media type in the snapshot. The same markup as application/xhtml+xml agrees
Wikipedia, World War II (recorded HAR) a paragraph whose lines cross the bottom of the viewport (p#mwOg) elmPartiallyObscuring passes
Wikipedia, World War II (recorded HAR) a list item far below the viewport (li#mwGE8) elmPartiallyObscuring passes

Per node, the recorded pages otherwise agree. The WHATWG parsing spec gives 10273/10273, MDN's elements reference 723/723, Wikipedia 5135/5137 and the generated stress page 12139/12139. Text scaled by a transform to under 1px (for example scale(0.05)) is a further known difference. The reference reports it as incomplete with no message key, or as bgOverlap, in ways that depend on how the page rounds hit testing. glance tests it as ordinary text. Still text far off the left of the page, inside a box that reaches the screen, is another known difference. An example is a marquee with scrollamount="0" at left:-9999px that stretches to the viewport's right edge. The reference passes the text, while glance finds it not applicable because its text box lies before the page origin. No case pins it.

Known differences: aria-command-name

Case aria-command-name/22-math-svg-button (listed in conformance/differential/known.json, in every mode). Not fixed yet: issue #50.

Row Node Reference glance
<svg role=button> <svg role="button" aria-label="s" tabindex="0"> not applicable passes (aria-label)
<math role=button> <math role="button" aria-label="m" tabindex="0"> passes, lists aria-label passes, lists has-visible-text and aria-label

Known differences: target-size

Nodes of the reference's integration fixture target-size/target-size (conformance/fixtures/, run with conformance/fixtures/run.mjs --rule target-size) where glance's outcome differs from the reference's under our runner. The fixture is not read (clean room), so only the node ids and outcomes are known. The fixture is listed in conformance/fixtures/known.json, whose reason points here.

Row Node Reference glance Probed and ruled out (reference and glance agree on each probe)
target-size #pass1 #pass1 passes violation it turned to a violation when small neighbours began to be measured by min(circle, edge), which 280 generated layouts require; ruled out: the neighbour's centre as its box centre, its free pieces' bounds or its smallest piece; centres of pruned pieces only; edge to the largest or the first passing piece; circle alone for tiny neighbours; edge only when boxes overlap
target-size #pass2 #pass2 passes violation it turned to a violation together with #pass1, when small neighbours began to be measured by min(circle, edge); ruled out: the neighbour's centre as its box centre, its free pieces' bounds or its smallest piece; centres of pruned pieces only; edge to the largest or the first passing piece; circle alone for tiny neighbours; edge only when boxes overlap; covers that are not targets, translucent or partial; a target inside a link or button that holds other content
target-size #pass-inline-diff-dest-2 #pass-inline-diff-dest-2 passes violation inline links side by side and wrapped, to different destinations (relative, absolute, fragment, query), in text and set off by <br>; same-destination pairs (now agree, case 88); inline-block links; links whose only content is a widget
target-size #incomplete5 #incomplete5 incomplete violation tabindex=-1 targets and neighbours; a partial cover by a non-tabbable target; covers that are not targets or are translucent; overflow:auto and overflow:hidden scrollers; position:fixed; a target above the page top
target-size #incomplete6 #incomplete6 incomplete violation tabindex=-1 targets and neighbours; a partial cover by a non-tabbable target; covers that are not targets or are translucent; overflow:auto and overflow:hidden scrollers; position:fixed; a target above the page top; custom elements whose internals role is public or private
target-size #inapplicable7 #inapplicable7 not applicable passes composite roles and tabpanel (now agree, case 95); descendants of <svg>, foreignObject and <math>; custom elements with public and private internals roles; the inline exception (text before, after and around a link, <br>, soft wraps, &nbsp;, inline-block; now agree, case 94); disabled and aria-hidden targets

Each probe was a page run through conformance/differential/run.mjs. #pass18 differed too until inline targets measured from their line boxes (case 93). Every own case agrees (conformance/cases/target-size/, plus seven generated pages of 280 random button layouts that agree apart from related-node order).

target-size on the recorded pages

See COMPAT-REAL-PAGES.md.

No differential case differs; the differences on the recorded pages are in COMPAT-REAL-PAGES.md.

ElementInternals and custom elements

glance reads the ARIA semantics a page exposes on its custom elements' ElementInternals (docs/spec/integration-fixtures.md §6(a)): through globalThis._elementInternals, a property _internals, internals or internals_ (own or inherited), or a symbol described internals or privateInternals (Symbol.for included), or, when supplied, axe.externalAPIs data alone. Internals kept in a private field stay invisible. The internals role is the element's implicit role; its string ARIA properties stand in for absent attributes. No known differences remain in the differential suite.

Row Where Reference glance
community-protocol internals cases list/33-internals-children, listitem/17-internals-parent, aria-required-parent/34-internals-parent, aria-required-children/53-internals-child, aria-allowed-attr/41-internals-role, aria-required-attr/55-internals-props, aria-valid-attr-value/42-internals-expanded (and nested-interactive, aria-required-attr in their default mode) uses the internals role and ARIA properties a page exposes same
custom element without a role cases aria-allowed-attr/41-internals-role, aria-allowed-attr/42-custom-element-no-role a non-global ARIA attribute on a role-less custom element is incomplete same
element-reference properties none not observed ariaControlsElements, ariaActiveDescendantElement and the other element-reference properties are not read, from the page or from externalAPIs
heading-order, target-size none internals ariaLevel sets a heading's level; an internals widget role makes a target not built in glance, so no case; the snapshot carries aria-level and the role for them

Reference fixtures

The reference integration fixtures glance or the reference still fails under our runner are listed in COMPAT-FIXTURES.md.