Rendered conformance: scenarios over a widget mounted in a real browser,
each a function of a small harness that returns its findings as data. A
scenario reads what the page did (roles and names from Chromium's own
accessibility tree, state from attributes, focus from document); it never
reads a Model, a Slot or an obligation, so it holds a shipped widget and a
view assembled from primitives to the same behaviour. Conformance.server
is the half that reads server markup parsed back. Re-exported as
Conformance from foldkit-mixins/testing.
"Rendered" is a claim about one page: these checks happened here. Whether
the declarations fit together is A11y.check's (structural) and what the
author says is provides (declared).
A checkbox: its role and name from the accessibility tree; Space toggles it
and what it reports (aria-checked, or the native checked) follows, both
ways; a press toggles it; a disabled one does not toggle.
A dialog: its role and name from the accessibility tree; focus moves in when
it opens and Tab never leaves it; Escape closes it and gives focus back to
what had it; opened over another dialog, Escape closes only the inner one,
focus returns into the outer, and a second Escape closes the outer.
A harness over Vitest's browser mode: keys from userEvent.keyboard, the
accessibility tree from Chrome's own (Accessibility.getFullAXTree, which
names an element as a screen reader hears it, where Vitest's locators read
generated text Chrome leaves out), and a pointer press as dispatched events,
which reach an aria-disabled element Playwright refuses to press. The tree
is read in the frame root is drawn in and kept to the nodes inside root,
each with its DOM node.
A listbox: roles and names from the accessibility tree; the arrows (mirrored
under right to left when horizontal), Home and End move the keyboard over
the enabled options and never onto a disabled one; Enter and Space activate;
a press selects an enabled option and not a disabled one; aria-selected has a value on
every option after every step.
The server half: a widget rendered to a string and parsed back holds each
expected role with its name and attributes, so a page served before it
hydrates already conforms. scenario only labels the findings.
Tabs: the tab list, tabs and the one panel from the accessibility tree, the
panel named by its tab; exactly one tab selected, its aria-controls the
panel; the arrows (mirrored under right to left) move over the enabled tabs
and never onto a disabled one, which says it is disabled; Home and End reach
the ends; aria-selected has a value on every tab after every step.
A tree: its role, name and rows from the accessibility tree; the arrow
toward the end opens a shut parent, then moves onto its first child; the one
toward the start goes back to the parent, then shuts it (both mirrored under
right to left); Down and Up move over the rows showing; Home and End reach
the ends; aria-expanded has a value on every parent.