Description
Generate role/state snapshots and attempted transitions under caller-reviewed consistency edges, checking state tokens lexically without certifying role applicability or accessibility.
An interface fixture makes content and state explicit so a consumer can test a rendering or interaction. Literal labels, modeled states, and calculated geometry remain separate from what a browser or assistive technology actually displays or announces.
Generate role/state snapshots and attempted transitions under caller-reviewed consistency edges, checking state tokens lexically without certifying role applicability or accessibility.
When to use this tool
Use this generator to create reproducible aria state transition fixture cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply role, attribute, values, transitions, initialValue, eventCount in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read events, finalValue. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.
Validate all declared values with the linked ARIA state checker. Sample attempted values and apply only supplied from/to transitions, returning accepted/rejected events, current state, and escaped role/state markup.1
Delegated operations used for this result: aria state attribute pair checker. Their calculation or parsing conventions apply to the corresponding result fields.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| role | Role | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 128. |
| attribute | Attribute | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 100. |
| values | Values | Required. Array of Text; minimum UTF-16 length 1; maximum UTF-16 length 100.; minimum items 1; maximum items 16. |
| transitions | Transitions | Required. Array of Object; no unknown keys.; minimum items 0; maximum items 32. |
| transitions[].from | From | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 100. |
| transitions[].to | To | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 100. |
| initialValue | Initial Value | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 100. |
| eventCount | Event Count | Required. Safe integer; minimum 1; maximum 32. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| events | Events | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 32. |
| events[].from | From | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 100. |
| events[].attempted | Attempted | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 100. |
| events[].value | Value | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 100. |
| events[].accepted | Accepted | Required. Boolean. |
| events[].html | Html | Required. Text; maximum UTF-16 length 131072. |
| events[].lexical | Lexical | Required. Object; no unknown keys. |
| events[].lexical.knownState | Known State | Required. Boolean. |
| events[].lexical.definedValue | Defined Value | Required. Boolean. |
| finalValue | Final Value | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 100. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"role": "button",
"attribute": "aria-expanded",
"values": [
"false",
"true"
],
"transitions": [
{
"from": "false",
"to": "true"
}
],
"initialValue": "false",
"eventCount": 2,
"seed": 42
},
"output": {
"events": [
{
"from": "false",
"attempted": "true",
"value": "true",
"accepted": true,
"html": "<div role=\"button\" aria-expanded=\"true\"></div>",
"lexical": {
"knownState": true,
"definedValue": true
}
},
{
"from": "true",
"attempted": "false",
"value": "true",
"accepted": false,
"html": "<div role=\"button\" aria-expanded=\"true\"></div>",
"lexical": {
"knownState": true,
"definedValue": true
}
}
],
"finalValue": "true",
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- A lexically defined state does not establish that it is allowed for the supplied role or synchronized with behavior. Rejected transitions leave state unchanged; no browser or assistive technology is run.
- A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random Details Disclosure State Fixture Generator
Construct nested supplied disclosure content with open-presence keys and visibility derived from ancestor state; browser interaction and rendering remain app-tested.
- Random Drag and Drop Item State Fixture Generator
Generate atomic move attempts across supplied containers, checking capacities and item eligibility and retaining explicit rejected moves and inventory snapshots.