Brickheart

Handover: connector snapping and place X on Y commands for Brickheart

: Written by a human with AI assistance.

This is based on read-only inspection of BrickNet, BrickAgent and brickheart-web/app/src. Section 11 lists what I could not see or verify. Treat anything marked VERIFY as unconfirmed.

One correction to my earlier notes: I said connector frames use a +Y mating axis. BrickAgent's joints.py docstring says "+Y axis", but BrickNet's DATA.md says "the mating axis of a connector frame is its -Y". The two sources conflict. The placement formula below doesn't depend on which is right, but anything that says "up" or "down" in announcements does (section 6).

1. Goal and MVP scope

The user picks a part in the palette and a target part (default: the last placed part). They then say which connector of the palette part goes on which connector of the target, for example #1234 hole 3 to #7896 stud 3. The first-named part is the one that moves.

In the MVP:

  • Stud-family mates only.
  • One connector pair, plus a quarter-turn "turn" choice.
  • Connector numbers are 1-based in the UI and 0-based in code.
  • Warnings are written, never blocking.
  • Keyboard and button input only.
  • A moved part carries its attached parts by translation only. Rotation applies to a single part.

Out of the MVP: axle, pin, hinge, ball and fixed joints; stability and physics; drag and magnetic snapping; rotating whole subassemblies. See the roadmap in section 10.

2. What the source repos give you

  • BrickNet is MIT. Its graph is hand-rolled, with no graph library. The edge classes are StudEdge, AxleEdge, HingeEdge, BallEdge and FixedEdge. Mate rules are plain tables in core.py:

    • _STUD_MATES = {(hole,open), (hole,stud), (open,post), (open,tube), (stud,tube)}
    • _AXLE_MATES = {(axle,cross), (axle,socket), (bar,clip), (bar,cross), (pin,socket)}
    • Subtype names are in StudSub (stud, open, hole, tube, post) and AxleSub (bar, clip, axle, cross, pin, socket).
  • Connector data is labels.json.xz, 236 KB for the full catalog. Its format is {stem.dat: {kind: {subtype: rows}}}, with one extra polarity level for hinge, ball and fixed. A row is [x, y, z, pitch°, roll°, (yaw° for fixed | span length for axle)] in part-local LDU. The canonical connector order is sorted(kind), then sorted(subtype), then sorted(polarity), then row order.

  • Frame construction is in data.py::_load_all_connectors. It is a closed-form 4x4 from position, pitch, roll and yaw.

  • Addressing is in joints.py::_addresses. A connector's address is (type, index). For stud, hole and axle kinds the type is the subtype. For other kinds it is the kind. The index counts within each consecutive group of the canonical order. This is what makes "stud 3" and "tube 3" meaningful.

  • Compatibility is joints.py::compatible():

    • Stud/hole kinds pair when the sorted subtype pair is in _STUD_MATES.
    • Axle kinds pair when the sorted subtype pair is in _AXLE_MATES.
    • Hinge, ball and fixed pair when the subtypes match and the polarities are in/on.
  • Placement for stud-family joints reduces to one line. In joints.placement, side defaults to 1, slide is 0, and the rotation is spin(Y, yaw). The result is:

    source_part_pose = target_part_pose @ target_conn_frame @ RotY(yaw) @ inverse(source_conn_frame)

    The rest of that function handles axle, hinge, pin seating and flips, and belongs to later phases.

  • Existing-model detection is graph.py::_find_pairs, with _POS_THR = 3.0 and _AXIS_THR = 0.95 (LDU and cosine). It can be ported later to detect what a user's manually moved parts are already connected to.

  • Other BrickAgent data: bounds.json.xz (84 KB) gives per-part bounds and is usable for a cheap overlap warning. mirrors.json.xz and seating.json.xz can be ignored in the MVP.

3. Data conversion task (do this on a machine with Python)

The browser's DecompressionStream does not support xz, so a one-off build step is required. This machine has no Python or npm, so it is a separate task.

  1. Read labels.json.xz, part_aliases.json.xz and bounds.json.xz with lzma.
  2. Filter to the 2.5k stems the app ships.
  3. For each part, emit connectors in canonical flat order. Use BrickNet's own frame math from data.py so Python stays the single source of truth. Each connector should carry:
    • kind, sub, pol
    • length
    • a 12-number frame (3x3 rotation row-major, plus translation), rounded to 1e-6
    • the precomputed address (type, 0-based index)
  4. Aliases (VERIFY): BrickNet says substitution is T_new = T_part @ T_alias. The Rebrickable-to-LDraw mapping may land on a stem that is an alias. For an alias stem the app renders, emit its connectors as T_alias @ frame(canonical), so lookups work under either stem.
  5. Output one static file such as public/data/connectors.json (the app already lazy-fetches data/rebrickable.db). The expected size is under 100 KB. Add it to whatever offline caching the app already does.
  6. Also emit golden vectors. Use BrickAgent's Assembly.attach (needs pip install brickagent, but not the 1 GB meshes) to produce about 30 reference attachments as part A, connector, part B, connector, yaw, resulting pose. These are the test oracle in section 9.

4. TypeScript module design

Keep all of this in a new src/snap/ folder as pure modules with no DOM or three.js scene access, tested with node --test.

  • connectors.ts: loads the JSON and exposes getConnectors(stem), byType(stem, type) and address(conn).
  • mates.ts: ports _STUD_MATES and compatible(), and later the axle tables.
  • place.ts: placement(targetPartPose, targetConn, sourceConn, yawTurns) returning a 3x3 plus translation, computed in LDraw space.
  • describe.ts: spoken and written connector descriptions (section 6).
  • grammar.ts: parser and formatter for the command grammar (section 7).
  • warn.ts: cheap warnings (section 8).

5. Coordinate frames

Connector data and BrickNet math are in native LDraw space (-y up). The app's PartRecord is in "engine coordinates", and mpd.ts shows how the conversion is done:

x: p2[0], y: -p2[1], z: -p2[2]

This is F = diag(1,-1,-1), a rotX(π). That matches the engineRotFromLdraw guess in parts.ts (rotation conjugated as F·R·F). So the position conversion is confirmed by mpd.ts, and the rotation conversion is consistent with it. The comment in parts.ts still says "INFERRED... Unverified", so VERIFY it with the test in section 9 before trusting it.

Recommended rule: do all snap math in LDraw space. Convert a PartRecord to LDraw (x, -y, -z for position, F·R·F for rotation), compute, then convert the result back at the boundary. Never mix frames inside place.ts. If snaps land mirrored, the fault is almost certainly here.

6. Describing connectors for people

Index numbers like "hole 3" mean nothing unless the app says where they are, so the connector description is a core feature, not an extra. For any part and type, announce:

"stud 3 of 8: column 2 of 4, row 1 of 2, top face"

Derive the label from the connector's position in the part's own frame. Group connectors of one type by unique x and z values (rounded to 1 LDU), rank the columns and rows, and take the face from the connector's axis direction. Because of the -Y/+Y conflict above, decide "top" and "bottom" from the actual part geometry in a test, not from the docs. Part-local labels are not part-local if the part is rotated, so describe relative to the part's own orientation, and optionally add the world compass direction.

7. Command grammar and UI

The picked palette part is the source and moves. The target defaults to the last placed part.

place [#id] <type> <n> on [#id] <type> <m> [turn <0-3>]
#1234 hole 3 to #7896 stud 3
list connectors [#id] [type]
  • <n> and <m> are 1-based and counted within the type.
  • If #id is omitted on the source, use the next free instance of the picked palette row. If omitted on the target, use the last placed part.
  • "Turn" is quarter-turns about the vertical axis. It is the stud's rotational freedom. It maps to Placed.turns and the existing RY matrix, which equals BrickNet's ry4(90°).

Compatible-only labels (your point 6): when source and target are chosen, list only the target's connector types that mate with at least one source type, and only the source connectors that mate. For "place X on Y" show only Y's studs and X's holes and tubes. The pairing comes straight from compatible(). Offer the same thing without typing: two pickers (source connector, target connector) plus a turn button, each listing only compatible entries. The typed grammar and the pickers should build the same command object, so touch and screen-reader users have an equivalent path.

Preview before commit: announce the result ("X will sit on Y's stud 3, 2 other connections, 0 warnings"), then confirm with Enter or a button.

8. State and warnings

State. build.ts keeps an operation list (place, move, rot, del) with a cursor for undo and redo, and derives everything from it. Keep that design:

  • Add an op such as {k:'snap', id, row, targetId, srcAddr, tgtAddr, turns}.
  • derive() computes the absolute pose from it deterministically, so undo and redo work unchanged.
  • Store the connection as a graph edge for the "moved part carries what it's attached to" feature. A move translates the connected component; a rot of a connected part detaches it and says so in the message line.
  • That reading of "only simple translation for MVP" is mine. Please confirm it (section 11).

Warnings (written, non-blocking, in the existing #msg live region).

  • Overlap: oriented bounds from bounds.json against nearby parts, with a 1 LDU allowance like BrickNet's.
  • Occupied target connector, which needs the edge list.
  • Partial mating: count other connector pairs that coincide after the snap using _POS_THR/_AXIS_THR, and report "mated at 1 of 8 studs, misaligned" for rotations that fit one pair only. A single connector pair doesn't guarantee a 2x4 brick sits sensibly after a 90° turn, so this check matters.

9. Tests (all require no browser)

  1. Frame test: engineRotFromLdraw and renderParts against known placements, to settle the INFERRED comment.
  2. Python oracle: the golden vectors from section 3 must match TS to 1e-5.
  3. Round-trip on a real model: BrickNet ships _data/car.ldr. For each connected pair in it, placement from the pair should reproduce the file's pose, modulo the quarter-turn.
  4. Compat table: every pair in _STUD_MATES and _AXLE_MATES is accepted, and a handful of non-pairs are rejected.
  5. Grammar: parse and format round-trips, 1-based to 0-based, error messages.

10. Roadmap

  1. Foundations: data conversion, connectors.ts, mates.ts, frame verification test.
  2. Stud family: place.ts for stud, hole, tube, open and post, with turn. Include describe.ts and list connectors.
  3. UI and grammar: parser, pickers, compatible-only filtering, preview and confirm, snap op, announcements.
  4. Warnings and edges: overlap, occupied, partial mate. Add edge storage and translate-with-attached on move.
  5. Axle family: pin, axle, socket, cross, bar, clip. This needs the flip, slide and pin-seating logic from joints.placement, plus seating.json.
  6. Hinge, ball, fixed: polarity-based pairing. Fixed has strict orientation and ball has free tilt, so these need extra UI.
  7. Later options: nearest-compatible-connector suggestion ("snap to nearest") as a keyboard action, and subassembly rotation.

11. Unverified items and open decisions

  • Not read: the rest of build.ts (derive(), keyboard and touch handlers, the units of move ops), tools/check-mapping.mjs (the path does not exist, so the file may live elsewhere), graph.py::_find_pairs, BrickAgent's LICENSE (pyproject.toml says MIT), and the real contents of labels.json.xz.
  • Which kind owns which subtype is unverified. Names like hole appear as a subtype of the hole kind, and open appears in two pairs. Check the real data before writing mates.ts.
  • Mating axis: -Y per DATA.md, +Y per the joints.py docstring. Resolve with a test.
  • Decision to confirm: moving a part translates its attached component, and rotating a connected part detaches it. This is my reading of "only simple translation for MVP".
  • Decision to confirm: should overlap warnings use the target's neighbors only, or all placed parts? All parts costs more as builds grow.

12. Licensing notes

  • BrickNet is MIT and Brickheart is MIT. Keep BrickNet's copyright notice in any ported code and in the converted data's accompanying notice.
  • The connector labels derive from the LDraw library, whose license you already carry.
  • I'm not a lawyer, so confirm the attribution wording for the converted data yourself.

Revisions to earlier sections

  • Section 8 (state): move affects a single part. Drop my earlier idea of carrying the connected component on move. Group translation is a separate feature (Addendum B).
  • Section 8 (warnings): warnings are computed for the part being placed only, checked against the other placed parts. A placement costs one pass over the placed parts, which is fine at these sizes. Nothing is re-checked when other parts move.
  • Section 11: decisions on moving attached parts and on the overlap scope are now settled.
  • Section 12 (licensing): see Addendum E for the updated stance.

13. Palette buckets

13.1 Purpose and principle

Each set's palette is grouped into five buckets so a builder can learn the layout once and reuse it across sets. Consistency matters more than cleverness. Each part is in exactly one bucket, chosen by a fixed hierarchy where the first matching rule wins.

13.2 Classification hierarchy (first match wins)

Order Bucket Meaning
1 Wheels wheels, tyres, rims
2 Decorative printed parts, stickers, tiles and other finishing parts
3 Interaction parts the builder moves in the finished model: doors, steering, levers, hinged lids
4 Functional parts with axle, hinge, ball or fixed connectors that don't qualify as interaction
5 Structural everything else, including bricks, plates and baseplates

Structural is the default. A part that matches nothing lands there. That rule has to be documented in the app's help text.

Classification order is separate from display order. I suggest displaying structural, then functional, then interaction, then decorative, then wheels, so the build order roughly follows the palette. Decision for you: confirm that display order or change it. It's a single constant.

13.3 Signals available

  • From the DB (DbRow): Rebrickable category, family and name. Category is the strongest signal for wheels and decorative parts.
  • From the stem and name: print variants (LDraw stems with a print suffix such as p01 or pr0001), plus words like "Pattern", "Sticker" and "Print". VERIFY the suffix patterns against a sample from the 2.5k parts, because I haven't listed them.
  • From BrickNet connector data (once converted):
    • structural signature: only stud and hole kinds, with at least one stud
    • finishing signature: no studs, at least one hole or tube
    • functional signature: any axle, hinge, ball or fixed connector
    • interaction candidate: hinge or ball connector. Axle is ambiguous (often static) and fixed is a rigid mount, so neither counts alone
  • From the graphed models (Section 14): how a part is actually used. A hinge part whose edges are mostly hinge edges is likely interaction. One used as a static joint is not.

13.4 Rules table and ownership

Keep the rules in one data file, palette-rules.json, with one entry per rule: id, bucket, match (category list, name regex, stem regex or connector signature), and a short plain-language reason. The offline job writes the result for every part as {stem: {bucket, ruleId}}. This makes every placement explainable ("Decorative because: category is Tile") and testable.

Task: list the distinct Rebrickable category values in the 2.5k-part DB and map each to a rule. The DB is read in-browser via sql.js, so a one-off node script with better-sqlite3 (already a devDependency) can do it.

13.5 Ordering inside a bucket

  • Structural: by quantity in this set (descending), then by footprint (from bounds.json, descending). This puts bulk parts first.
  • Other buckets: by quantity (descending), then name.
  • Order must be stable between loads and must not depend on the global statistics (Section 14), so the layout stays learnable.

13.6 Accessibility

Each bucket is a labelled group with a heading and an item count. Announce the grouping once on load. Don't reorder silently while the user is navigating.

13.7 Validation

Hand-label about 100 parts spread across the buckets. Rules must reproduce those labels. Keep the labelled list as a regression test, and fix the rules rather than special-casing parts.

14. Statistics and "Suggested next"

14.1 Input

The LDraw OMR is already packed as JSON with every model in MPD form. VERIFY the pack's shape and size before sizing the job.

14.2 Offline job (needs a machine with Python)

  1. Flatten each MPD. Use BrickAgent/scripts/flatten.py, or reuse the logic of mpd.ts::flattenMpd. Pick one and use it for every model so results are consistent.
  2. Apply load_aliases() and drop lines whose stems are outside BrickNet's vocabulary. parse_ldr raises KeyError otherwise. Log the dropped stems and the percentage of parts covered.
  3. Run bricknet.parse_ldr to get each model's graph.
  4. Aggregate per canonical stem, then map stems to your 2.5k parts.

14.3 Statistics to produce

Stat Use
Mean relative position in file order (0 to 1) feature for bucketing and within-bucket sanity check
Leaf fraction (share of occurrences with degree 1) decorative and accessory signal
Connector fill ratio decorative signal
Share of models containing the part rarity
Share of occurrences with a non-stud edge functional and interaction signal
(earlier stem, later stem) counts of distinct part pairs "Suggested next"

File order only approximates build order, since it follows the model author. Treat the position and follower statistics as approximate.

14.4 "Suggested next" (a shortcut pick mode)

This is a UI option alongside the existing modes, not a replacement for the bucketed palette.

  • A key or button jumps to a short list of 3 to 5 suggestions, chosen from the remaining inventory only, given the last placed part.
  • The score is a smoothed conditional probability backed off to global popularity: (n[T,C] + α·P(C)) / (n[T] + α).
  • When nothing is placed, fall back to the global first-placed distribution.
  • The suggestions are announced as a list. Picking one behaves exactly like picking from the palette.
  • Ship a pruned follower table (the top ~30 per part, restricted to the 2.5k parts) as a static JSON beside connectors.json. VERIFY the size once it exists. I expect tens to a few hundred KB gzipped.

14.5 Validation before shipping

Hold out some models, replay their file order, and measure how often the true next part is in the suggested top 1, 3 and 5 of the remaining inventory. Compare against two baselines: global frequency and the bucket-order default. If the table doesn't clearly beat global frequency, don't ship it.

Addendum A: choice of connector data source

You have two candidate sources:

BrickNet LDCad shadow library
Coverage 14,583 parts about 3k parts (your figure)
Format labels.json.xz, with closed-form frame maths in data.py not inspected
Mate rules tables in core.py, plus compatible() not inspected
Licence MIT not checked
Code reviewed yes, in detail no

Recommendation: use BrickNet for the MVP, because it is the only source I've read and its rules are already traced. But decide from data, not from my preference. Run this check on a machine with Python (or with node and the DB):

  1. Take the 2.5k stems in the app.
  2. Count how many have connector data in BrickNet (after aliasing) and how many in the LDCad shadow library.
  3. Choose the source with the better coverage of your parts, not of the catalogue.

Keep the converted format source-neutral. connectors.json has a fixed schema (kind, sub, pol, length, 12-number frame, address). If LDCad's data is needed for gaps, a second converter writes the same schema and the browser code doesn't change. VERIFY that LDCad's connection model (its snap points have different geometry and semantics) can be mapped to BrickNet's (type, index) addressing before promising that.

Addendum B: assemblies (connected groups)

  • A "group" is a set of placed parts connected to each other. The reference JS already finds these and has a save option.
  • Groups can be translated, not rotated.
  • Once the snap module exists, a group's membership could be derived from stored snap edges and from geometric detection (a port of _find_pairs, as discussed earlier). Until then, use the reference code unchanged.
  • Don't reuse move for groups. Add a separate moveGroup op so undo and redo stay simple, and a single-part move never silently drags others.
  • Open: how a saved group appears in the palette and the connector pickers. Groups don't have connector types. They'd need to expose the free connectors of their member parts. Decide later, after the single-part snap works.

Addendum C: placement warnings

For the part being placed, in this order:

  1. Overlap: its oriented bounds against each placed part. Tolerance is a constant. VERIFY whether bounds.json includes the studs. If it does, expect a stud-height overlap on every stacked pair and set the tolerance accordingly. It can be checked in one minute on a machine with Python.
  2. Occupied connector: the target connector already has a partner (needs the stored edges).
  3. Partial mate: count the other connector pairs that line up after the snap, using the _POS_THR and _AXIS_THR thresholds from graph.py, and report "mated at 1 of 8 studs".

All three are written messages in the existing #msg live region. Nothing blocks placement. Wording should say "may overlap", because bounds are approximate.

Addendum D: parked ideas (not MVP)

Each has its dependency listed so nobody mistakes it for MVP scope.

  1. LLM-assisted draft instructions for older sets.
    • Goal: a machine-generated first draft of text instructions for sets where manuals are hard to use, for human review. Bricks for the Blind produces human-written text instructions, and a draft pipeline could widen the pool of sets they could review. Contact them before building anything. They might want drafts, have a style guide, or know what volunteers find hard. Unknown whether they would.
    • Quality bar: a blind builder can't check a step against a picture, so unreviewed output isn't safe to build from.
    • Labelling (your decision): every generated set is released CC0 and carries a clear label that it is a machine-generated draft. I'd add a per-set status (draft, reviewed) so reviewed text can be told apart later.
    • Tiers of source: small sets (under 50 parts) from box images, larger ones from manuals. Box-image results are a plausible reconstruction, not LEGO's actual build, and the label should say so.
    • Scope facts: about 5,000 sets are scoped, already filtered for flexibles, out-of-vocabulary parts, stickers and minifigs, with a mean of 98 parts. OMR overlap is small. That filtering was done on your side and I haven't seen it.
    • Dependencies: the stud-family snap module, connector descriptions (Section 6), and the command grammar. The generated output is a command script in that grammar.
    • Checks worth keeping: exact inventory match, and a connectivity check via parse_ldr. Anything stronger needs ground truth you don't have, so budget for human review.
  2. LLM driving Brickheart (via an MCP server or in-page tools) uses the same pure modules headless. Its dependencies are the snap module and a batch command. It isn't needed for item 1.
  3. Axle, pin, hinge, ball and fixed joints. Roadmap phases 5 and 6 in Section 10.
  4. Subassembly rotation. Beyond the translation-only groups in Addendum B.
  • You've said Brickheart is free and operates in the same grey zone as the OMR, Rebrickable and similar projects. I've recorded that as your decision, not as legal advice, and I'm not a lawyer.
  • Keep the practical hygiene that costs nothing: BrickNet's MIT notice with any ported code and converted data, and the existing LDraw licence. Add a source line for any statistic derived from the OMR pack (an aggregate count, not model content).
  • CC0 for generated drafts is your project's declaration. It doesn't change who owns the source manuals. The "machine-generated draft" label should state that the text was derived from the manual and may contain errors.

Addendum F: open items and unknowns

Needed before implementing:

  1. Rest of build.ts, from line 325: derive(), the keyboard and touch handlers, and the units of move ops. The snap op can't be placed precisely without them.
  2. The engineRotFromLdraw verification (Section 5 and test 1). It is marked "INFERRED... Unverified" in parts.ts.
  3. The mating axis: -Y per DATA.md and graph.py, +Y per the joints.py docstring. Resolve with a test. graph.py's axes = -col1 supports -Y.
  4. Whether bounds.json includes studs.
  5. The real contents of labels.json (which kinds own which subtypes, for example open).
  6. The category values in the 2.5k-part DB.
  7. The shape and size of the OMR JSON pack.
  8. Whether import bricknet loads any collision code (check __init__.py).

Decisions made:

  • A single-part move, with a separate group move.
  • Warnings for the placed part only.
  • Alias mapping lives in the DB.
  • One bucket per part, with a fixed hierarchy.
  • "Suggested next" is an extra shortcut mode.
  • Generated drafts are CC0 and labelled as machine-generated.
  • BrickNet is the recommended connector source, pending the coverage check in Addendum A.

Still open for you:

  • The display order of the buckets.
  • How saved groups present connectors.
  • Whether to contact Bricks for the Blind before building anything in Addendum D.

Addendum G: input methods, platforms and the accessibility contract

G1. Principle

The app is a plain, well-behaved web page. The operating system's AT (switch scanning, voice control, gaze or head pointer emulation, screen readers) does the specialised work. The app's job is to expose everything through ordinary, correctly labelled DOM controls. Built-in scanning or dwell is optional and comes later.

G2. Baseline contract (applies to every profile)

  1. Every action is available as a DOM control. The WebGL canvas is output plus optional camera feedback. Nothing essential is only reachable by pointer events on the canvas.
  2. Keyboard operable with a short, logical focus order and a visible focus indicator that isn't hidden by sticky UI.
  3. No drag, hold, chord, hover-only or time-limited interactions.
  4. Accessible names contain the visible label text, so voice control can say "click place".
  5. Single-key shortcuts can be remapped or turned off, since they cause accidents for voice and switch users.
  6. Targets are at least the WCAG 2.2 minimum size, with larger sizes selectable.
  7. Undo and redo are one action. Save and resume are automatic, because fatigue ends sessions.
  8. No built-in timers in v1. Any later dwell or scan feature needs adjustable timing, a cancel, and a non-timed alternative.

WCAG 2.2 criteria to read before building: 2.1.1 (keyboard), 2.1.4 (character key shortcuts), 2.2.1 (timing adjustable), 2.4.7 and 2.4.11 (focus visible, not obscured), 2.5.3 (label in name), 2.5.7 (dragging movements) and 2.5.8 (target size minimum). VERIFY the current wording.

G3. Settings first, profiles last

Build independent settings, then name presets over them. The grammar and pickers produce the same command object (Section 7), so settings change only presentation.

Setting Options Why it varies
Target size and spacing normal, large, extra large gaze and head need large, touch medium
Confirm before placing on, off on avoids accidents, off saves actions
Placement entry numbered options list, three pickers, typed command fewer actions for scanning, typed for fast users
Single-key shortcuts on, off, remap harmful for voice and switch
List length and grouping full, short, "Suggested next" first shorter for scanning
Camera control buttons and presets, keys no mouse orbit
Announcements brief, full, off for screen-reader users
Motion and animation on, reduced comfort

Initial profiles: Mouse, Touch, Keyboard, Voice, Switch-friendly, Large-target (for gaze and head pointers). Keep each profile to a few lines of defaults.

G4. Revisions to earlier sections

  • Section 7 (grammar): the typed command stays, but as a secondary fast path and as the serialisation of the history file, not the primary input.
  • Section 7 (primary input): enumerated placements: for a chosen part and target, list the valid (target connector, source connector, turn) combinations as numbered options with a canvas marker and a short description. One choice replaces three.
  • Section 6 (descriptions): these are essential for output (history to text) and for screen-reader users, but less central for input than I first wrote. Numbered markers on the compatible connectors carry the input load.
  • Section 14.4 ("Suggested next"): move it nearer the core, as a profile default for Switch-friendly and Voice, since it saves selections per part.
  • Section 13 (buckets): bucket groups are headings, which also helps keyboard and switch navigation (skip to group). Keep group order consistent.
  • Connector numbering: use a display index in a predictable reading order (for example left to right, then front to back, in the part's own frame), mapped to BrickNet's canonical index. Don't expose BrickNet's raw order, which isn't spatial.

G5. Platform matrix

The same web app runs everywhere. What differs is the AT around it, and my knowledge of it is general and may be dated.

Platform AT I'd expect to matter Notes and risks (all VERIFY)
iOS and iPadOS VoiceOver, Switch Control, Voice Control, AssistiveTouch, built-in Eye Tracking on recent devices All browsers use WebKit, so engine behaviour is the same in each. Safari can evict site storage after a period of non-use unless the site is added to the Home Screen. That matters for an offline-first app with an IndexedDB LDraw store, so test it. WebGL memory limits are tighter.
Android TalkBack, Switch Access, Voice Access, camera-based switches Chrome is the main target. Behaviour varies by device and by vendor. Good for switch and voice, and the most varied hardware.
Windows NVDA, JAWS, Narrator, Voice Access, Eye Control, Dragon, third-party switch software The richest AT ecosystem, and the best supported for gaze (dedicated trackers) and voice. Good to treat as the reference platform.
Linux Orca, limited voice and switch tooling The weakest ecosystem. Basic keyboard and screen-reader support is realistic. I wouldn't promise switch, gaze or voice parity.

Two cross-platform notes:

  • Browser speech recognition (the Web Speech API) varies by browser, and in some browsers audio goes to a server. That conflicts with an offline-first app, so I'd rely on the OS's voice control and not build recognition into the page. VERIFY current support.
  • Screen reader plus browser combinations behave differently. Test at least one common pair per platform (for example NVDA with Firefox or Chrome, VoiceOver with Safari, TalkBack with Chrome, Orca with Firefox).

G6. Support tiers (to publish in the app's help)

Don't say "equal". Say what has been tested.

  • Tier 1, tested each release: Windows (NVDA and Narrator, plus Voice Access), iOS (VoiceOver, Switch Control, Voice Control), Android (TalkBack, Switch Access).
  • Tier 2, keyboard and screen reader tested occasionally: Linux with Orca.
  • Untested: gaze and head-tracking hardware beyond OS pointer emulation, until a tester provides it.

Change the tiers to match what you can actually test. A published, honest list beats an implied promise.

G7. Test plan

  1. Tab-only run: do the full task (open a set, place, undo, save) using only Tab, Shift+Tab and Enter. It's a cheap proxy for two-switch step scanning. Count the tab stops per placement and set a budget.
  2. Built-in tools per platform: iOS Switch Control and Voice Control, Android Switch Access and Voice Access, Windows Voice Access, against the real page.
  3. Pointer emulation: a head or eye pointer, or any dwell-click tool, on a laptop. It confirms there is no hover dependency.
  4. Offline and storage: install the LDraw pack, go offline, close the browser, return after several days (iOS in particular), and confirm the data is still there.
  5. Measures for testers: actions per placement, time to first attach, errors and recoveries, abandonment and fatigue. Record the AT and platform for each session.

G8. Open items

  • Which Linux browser and screen reader combination to treat as the reference.
  • Whether to add built-in dwell or scan later (the timing requirements are listed in G2).
  • Pointer-based placement on the canvas (clicking a connector marker) is allowed but never required, and must meet the dragging and target-size criteria.

Questions

  1. Which platform and AT will your first testers use? That sets the Tier 1 list.
  2. Do you have an iOS device, an Android device and a Windows machine to test on, or is some testing borrowed?
  3. Is Linux support a real target, or does it mean "works with a keyboard"? I'd rather word the help text honestly than imply more.
  4. Is the app installable as a PWA (Home Screen or desktop install) today? It affects storage persistence on iOS.
  5. Should voice be OS-only (my recommendation, for the offline reason), or do you want in-page voice commands despite the cost?