Criteria, checks and packs

A criterion is one thing a step must meet. It has an id (AC1), a text for people and exactly one check. How to add them to a scenario: Add criteria and packs. How the results turn into a verdict: How verdicts are decided.

Kinds of check

typeWhen to use itOptions
deterministicanything countable or exact: presence, counts, text, the URL, styles, values in the pageassert and its options (below)
semanticjudgement: is the copy clear, is there one primary actionquestion (English, yes = met), true and false (what counts as yes and no), scope (CSS selector sent to the evaluator), about: console (read the console errors instead of the page), vision: true (also show the screenshot)
manualneither works; a reviewer decides on the canvasnote

Numbers, dates and counts belong in deterministic checks, never in a semantic question. Ask one thing per question.

Deterministic checks (assert)

Common options: selector (CSS), pattern (a regex) with flags (i, m, s), value, min, max, all (every match must pass, not just one).

Page content

assertPasses when
existsselector matches at least one element
absentselector matches nothing
countthe number of matches is between min and max
text_matchesthe element's visible text matches pattern
text_absentno visible text matches pattern
text_equalsthe whole text equals value (whitespace collapsed)
attr_equalsattribute attr equals value
attr_matchesattribute attr matches pattern
no_overflowthe page does not scroll sideways
no_console_errorsthe console has no errors
assertPasses when
title_matchesthe page title matches pattern
meta_matchesthe content of the selector meta tag matches pattern
link_matchesthe href of the selector link matches pattern
url_matchesthe URL after the step matches pattern; part picks href, path, query, hash, host or origin
url_equalsthe URL equals value (a path or a whole URL); ignore_query drops ?… and #…
http_statusthe document's status is between min and max (default 200–299), or equals value
link_homethe page links back to the home page
links_okevery same-origin link answers below 400 (max links per page, pattern skips paths, follow outside read-only environments)
hreflang_pairsat least min languages, each version answers 200 and links back

Styles and values in the page

assertPasses when
style_equalsthe computed CSS property equals value or a design token; op compares numbers (>=), tolerance allows px rounding
style_matchesthe computed property matches pattern
js_equalsone read-only JavaScript expression in the page returns value (or matches pattern, or compares with op)

Accessibility (the a11y pack uses these)

assertPasses when
a11y_images_altimages have alternative text
a11y_nameslinks and buttons have an accessible name
a11y_labelsform fields have labels
a11y_headingsheading levels are not skipped
a11y_contrasttext meets WCAG AA contrast
a11y_mainthe page has a main landmark
a11y_unique_idselement ids are unique
a11y_focus_orderTab order follows the page and reaches every control
a11y_focus_visiblefocus is visible with at least 3 : 1 contrast
a11y_keyboard_trapTab never gets stuck
a11y_skip_linka skip link or the main content within three Tab stops
a11y_ax_namescontrols have a name in the browser's accessibility tree
a11y_landmarkslandmarks are complete and repeated ones labelled
a11y_ariaARIA roles and attributes are valid

Performance, apps and design

assertPasses when
perf_lcp, perf_cls, perf_ttfb, perf_weightlargest contentful paint, layout shift, time to first byte or page weight stays within max
app_labelsevery app control has an accessible label
app_touch_targetstouch targets are at least 48 dp (Android) or 44 pt (iOS)
app_no_truncationno text is cut off with an ellipsis
app_no_crashthe app did not crash or stop responding
design_pixelsthe screen differs from the design reference in at most ratio of pixels (default 0.03)
design_structureheadings, landmarks, actions and fields match the design reference
uses_tokenscolours, fonts, sizes, spacing and radii come from the token set

Packs

packs: [seo, a11y] on a step adds a fixed set of criteria. A criterion of your own with the same id replaces the pack's, which is how you change a limit (AC401 with max: 4000).

PackIdsWhat it adds
seoAC101–AC111one H1, title 10–70 and description 50–160 characters, canonical, hreflang for every language, Open Graph, not noindex, viewport meta, html lang, no overflow, no console errors
usabilityAC201–AC204the purpose is clear on the first screen, one primary action, labelled fields, link texts that say what they do
a11yAC301–AC314every accessibility check above; the walk also presses Tab through the page, without clicking or typing
perfAC401–AC404LCP within 2.5 s, CLS below 0.1, TTFB within 800 ms, page weight within 3 MB (measured in the walk's browser)
consoleAC501the evaluator reads the console errors and says whether they touch what the step accepts
errorsAC601–AC606a real 4xx/5xx status, a link home, navigation or search, no stack trace, a plain message with a way forward, no console errors
appAC701–AC705labels, touch targets, no truncated text, no crash, a clear purpose and next action
designAC801–AC803the implementation against the design reference: pixels, structure, tokens

The a11y pack covers part of WCAG 2.2 AA. It does not replace an audit with a screen reader.

Kaloko · latest · 2026-10-06